An owner of a building shall be precluded from raising as a defense in an action brought by a lessee, tenant or occupant of said building who has sustained an injury caused by a defect in a common area, that said defect existed at the time of the letting of the property, if said defect is at the time of the injury a violation of the building code of the city or town wherein the property is situated. Any waiver of this provision in any lease or other rental agreement shall be void and unenforceable.
Mass. Gen. Laws ch. 186, § 15E