April 22, 1999 Allaire Corporation One Alewife Center Cambridge, Massachusetts 02140 Ladies and Gentlemen: We are familiar with the Registration Statement on Form S-8 (the "S-8 Registration Statement") filed today by Allaire Corporation, a Delaware corporation (the "Company"), with the Securities and Exchange Commission under the Securities Act of 1933, as amended. The S-8 Registration Statement relates to the proposed offering by the Company of 2,913,626 shares (the "Shares") of its common stock, par value $0.01 per share (the "Common Stock"), issuable upon exercise of stock options and other stock awards granted or to be granted pursuant to the Allaire Corporation 1997 Stock Incentive Plan and the Allaire Corporation 1998 Stock Incentive Plan (the "Stock Incentive Plans"). In arriving at the opinion expressed below, we have examined and relied on the following documents: 1. The Amended and Restated Certificate of Incorporation, and the Amended and Restated By-Laws of the Company; 2. The records of meetings and consents of the Board of Directors and stockholders of the Company provided to us by the Company; and 3. The Stock Incentive Plans. In addition, we have examined and relied on the originals or copies certified or otherwise identified to our satisfaction of all such corporate records of the Company and such other instruments and other certificates of public officials, officers and representatives of the Company and such other persons, and we have made such investigations of law, as we have deemed appropriate as a basis for the opinions expressed below. Allaire Corporation April 22, 1999 Page 2 Based upon the foregoing, it is our opinion that: 1. The Company has corporate power adequate for the issuance of the Shares in accordance with the S-8 Registration Statement. 2. The Company has taken all necessary corporate action required to authorize the issuance and sale of the Shares. 3. When certificates for the Shares have been duly executed and countersigned, and delivered against due receipt of the consideration for the Shares as described in the Stock Incentive Plans and the option agreement or other agreement related thereto, the Shares will be legally issued, fully paid and non-assessable. We hereby consent to the filing of this opinion as an exhibit to the S-8 Registration Statement. Very truly yours, FOLEY, HOAG & ELIOT LLP By: /s/ William R. Kolb --------------------------- a Partner