1 EXHIBIT 5.0 OPINION OF MULDOON MURPHY & AGUGGIA LLP 2 [MULDOON MURPHY & AGUGGIA LLP LETTERHEAD] March 27, 2007 Board of Directors CNB Financial Corp. 33 Waldo Street Worcester, Massachusetts 01608-0830 Re: CNB Financial Corp. Amended and Restated Stock Option Plan Members of the Board of Directors: We have been requested by CNB Financial Corp., a Massachusetts corporation (the "Company"), to issue a legal opinion in connection with the registration (the "Registration") of 398,400 shares of the Company's Common Stock, par value $1.00 per share (the "Shares"). The Registration of the Shares is being effected on a Form S-8. We have made such legal and factual examinations and inquiries as we deemed advisable for the purpose of rendering this opinion. In our examination, we have assumed and have not verified (i) the genuineness of all signatures, (ii) the authenticity of all documents submitted to us as originals, (iii) the conformity to the originals of all documents supplied to us as copies, and (iv) the accuracy and completeness of all corporate records and documents and of all certificates and statements of fact, in each case given or made available to us by the Company. Based on the foregoing and limited in all respects to Massachusetts law, it is our opinion that the shares reserved under the plan have been duly authorized and, upon payment for and issuance of the shares in the manner described in the plan, will be legally issued, fully paid and nonassessable. This opinion is rendered to you solely for your benefit in connection with the issuance of the Shares as described above. This opinion should not be quoted in whole or in part, or otherwise referred to or furnished to any governmental agency (other than the Securities and Exchange Commission in connection with the aforementioned Registration Statement on Form S-8), or any other person or entity, without the prior written consent of this firm. 3 Board of Directors CNB Financial Corp. March 27, 2007 Page 2 We note that, although certain portions of the Registration Statement on Form S-8 (the financial statements and schedules) have been included therein (through incorporation by reference) on the authority of "experts" within the meaning of the Securities Act, we are not experts with respect to any portion of the Registration Statement, including, without limitation, the financial statements or schedules or the other financial information or data included therein. We hereby consent to the filing of this opinion as an exhibit to, and the reference to this firm in, the Company's Registration Statement on Form S-8. Very truly yours, /s/ Muldoon Murphy & Aguggia LLP MULDOON MURPHY & AGUGGIA LLP