1 EXHIBIT 5.1 FOLEY, HOAG & ELIOT LLP One Post Office Square Boston, Massachusetts 02109 April 4, 1997 Cayenne Software, Inc. 8 New England Executive Park Burlington, MA 01803 Ladies and Gentlemen: We are familiar with the Registration Statement on Form S-3 transmitted for filing by the Company today (the "S-8 Registration Statement") relating to 1,889,195 shares (the "Shares") of the Company's Common Stock to be offered and sold by certain holders of Series B Convertible Preferred Stock (the "Preferred Stock") and Warrants of the Company (the "Selling Stockholders"). We are familiar with the Company's Articles of Organization and all amendments thereto, its By-Laws and all amendments thereto, the records of all meetings and consents of its Board of Directors and of its stockholders, and its stock records. We have examined such other records and documents as we deemed necessary or appropriate for purposes of rendering this opinion. Based upon the foregoing, we are of the opinion that (a) the Company has corporate power adequate for the issuance of the Shares in the manner set forth in the S-3 Registration Statement; (b) the Company has taken all necessary corporate action required to authorize the issuance and sale of the Shares to the Selling Stockholders upon conversion of Preferred Stock or exercise of Warrants; and (c) upon issuance in accordance with the aplicable provisions of the Preferred Stock or the Warrants, the Shares will be legally issued, fully paid and non-assessable. We consent to the filing of this opinion as an exhibit to the S-3 Registration Statement. Very truly yours, FOLEY, HOAG & ELIOT By: /s/ David W. Walker a Partner