Whenever an attempt has been or is hereafter made to create a municipal corporation, either by special act of the legislature or by proceedings taken under the general laws of the state, and such corporation has chosen officers and has exercised the powers, duties and authority vested in it by the law under which it purports to have been created, and such corporation has become indebted to any person, association or corporation in the aggregate amount of five hundred dollars or more, and such corporation shall have been held or declared to be no corporation by a court of record of competent jurisdiction of this state, either because the special act creating it is declared to be unconstitutional, or otherwise, then such corporation shall be deemed a de facto corporation for the purpose of winding up its affairs and paying its indebtedness; and its officers shall be deemed de facto officers and shall have all the powers and authority and shall perform all the functions and duties vested in or required of them under the law pursuant to which such corporation was attempted to be created, so far as may be necessary to liquidate the affairs of such corporation and to pay its money obligations, including all the power and authority to assess, levy and collect taxes upon the taxable persons and property within the corporate limits of such illegal corporation, to such an amount as shall be sufficient to pay obligations of such corporation and the expense incident thereto.
N.Y. Gen. Mun. Law § 89