Exhibit 5 Hale and Dorr LLP Counsellors at Law 60 State Street, Boston, Massachusetts 02109 617-526-6000 - Fax 617-526-5000 October 8, 1997 Casella Waste Systems, Inc. 25 Greens Hill Lane Rutland, VT 05701 Ladies and Gentlemen: This opinion is furnished to you in connection with a Registration Statement on Form S-1 (File No. 333-33135, the "Registration Statement") filed with the Securities and Exchange Commission (the "Commission") under the Securities Act of 1933, as amended, for the registration of 4,600,000 shares of Class A Common Stock, $0.01 par value per share (the "Shares"), of Casella Waste Systems, Inc., a Delaware corporation (the "Company"), including 1,000,000 Shares to be sold by certain selling stockholders (the "Selling Stockholders") and 600,000 Shares issuable upon exercise of an overallotment option granted by certain Selling Stockholders. The Shares are to be sold by the Company and the Selling Stockholders pursuant to an underwriting agreement (the "Underwriting Agreement") to be entered into by and among the Company and Goldman, Sachs & Co., Donaldson, Lufkin & Jenrette Securities Corporation and Oppenheimer & Co., Inc., as representatives of the several underwriters named in the Underwriting Agreement (the "Representatives"). We have acted as counsel for the Company in connection with the issue and sale by the Company and the Selling Stockholders of the Shares. We have examined signed copies of the Registration Statement and all exhibits thereto, all as filed with the Commission. We have also examined and relied upon the original or copies of minutes of the meetings of the stockholders and the Board of Directors of the Company, stock record books of the Company, a copy of the Second Amended and Restated By-Laws of the Company, a copy of the Amended and Restated Certificate of Incorporation of the Company, and such other documents as we have deemed necessary for purposes of rendering the opinions hereinafter set forth. In our examination of the foregoing documents, we have assumed the genuineness of all signatures and the authenticity of all documents submitted to us as originals, the conformity to original documents of all documents submitted to us as copies, and the authenticity of the originals of such documents. We assume that the appropriate action will be taken, prior to the offer and sale of the Shares in accordance with the Underwriting Agreement, to register and qualify the Shares for sale under all applicable state securities, or "Blue Sky", laws. Based upon and subject to the foregoing, we are of the opinion that the Shares have been duly authorized and, when issued and sold by the Company or sold by the Selling Stockholders pursuant to the Underwriting Agreement, such Shares will be validly issued, fully paid and nonassessable. We hereby consent to the filing of this opinion as part of the Registration Statement and to the use of our name therein and in the related Prospectus under the caption "Legal Matters." It is understood that this opinion is to be used only in connection with the offer of the Shares while the Registration Statement is in effect. This opinion is based upon currently existing statutes, rules, regulations and judicial decisions, and we disclaim any obligations to advise you of any change in any of these sources of law or subsequent legal or factual developments which might affect any matters or opinions set forth herein. Please note that we are opining only as to the matters expressly set forth herein, and no opinion should be inferred as to any other matters. Very truly yours, /s/ Hale and Dorr LLP --------------------------------- HALE AND DORR LLP -2-