N.Y. Environmental Conservation Law § 56-0509
1.
(a) Notwithstanding any other provision of law and except as provided in subdivision two of this section and in paragraph (h) of subdivision two of section 56-0503 of this title, the following shall not be liable to the state upon any statutory or common law cause of action, or to any person upon any statutory cause of action arising out of the presence of any contamination in or on property at any time before the effective date of a contract entered into pursuant to this title or written agreement pursuant to subdivision three of section 56-0503 of this title:
2. Subdivisions one and three of this section shall not apply to relieve any municipality, successor in title, lessee, or lender from liability arising from: