NY Gen Oblig L § 7-105 (2021)
2021 New York Laws GOB - General Obligations Article 7 - Obligations Relating to Property Received as Security Title 1 - Money Deposited as Security to Be Held in Trust in Certain Cases 7-105 - Landlord Failing to Turn Over Deposits Made by Tenants or Licensees and to Notify Tenants or Licensees Thereof in Certain Cases.

§ 7-105. Landlord  failing  to  turn  over deposits made by tenants or   licensees and to notify tenants or licensees thereof in  certain  cases.   1. Any person, firm or corporation and the employers, officers or agents   thereof,  whether  the  owner  or  lessee of the property leased, who or   which has or hereafter shall have received from a tenant or  licensee  a   sum  of  money  or  any  other thing of value as a deposit or advance of   rental as security for the full performance by such tenant  or  licensee   of  the  terms of his lease or license agreement, or who or which has or   shall have received the same from a former owner or lessee, shall,  upon   conveying  such  property  or  assigning his or its lease to another, or   upon the judicial appointment and qualifying of a receiver in an  action   to  foreclose  a mortgage or other lien of record affecting the property   leased, or upon the conveyance of such property to another person,  firm   or  corporation  by  a  referee  in an action to foreclose a mortgage or   other lien of record affecting the property leased if a  receiver  shall   not have been appointed and qualified in such action, at the time of the   delivery  of  the  deed  or instrument or assignment or within five days   thereafter, or within five days after the receiver shall have qualified,   deal with the security deposit as follows:Turn over to his or its grantee or assignee, or to the receiver in the   foreclosure action, or to the purchaser at the  foreclosure  sale  if  a   receiver  shall  not  have  been  appointed  and  qualified  the  sum so   deposited, and notify the tenant or licensee by registered or  certified   mail  of  such  turning  over  and the name and address of such grantee,   assignee, purchaser or receiver.2. Any owner or lessee turning over to his or its  grantee,  assignee,   to  a  purchaser of the leased premises at a foreclosure sale, or to the   receiver in the foreclosure action the amount of such  security  deposit   is  hereby  relieved of and from liability to the tenant or licensee for   the repayment thereof; and the transferee of such  security  deposit  is   hereby  made  responsible  for  the  return  thereof  to  the  tenant or   licensee, unless he or it shall thereafter and before the expiration  of   the  term  of  the tenant's lease or licensee's agreement, transfer such   security deposit to another, pursuant to subdivision one hereof and give   the requisite notice in connection  therewith  as  provided  thereby.  A   receiver  shall hold the security subject to such disposition thereof as   shall be provided in an order of the court to be made and entered in the   foreclosure action.  The provisions of this section shall not  apply  if   the   agreement   between   the  landlord  and  tenant  or  licensee  is   inconsistent herewith.3. Any failure to comply with this section is a misdemeanor.