[Addendum]
Security deposit law in Massachussets seems to be one of those cases where professional legal advice is virtually mandatory. Subsection 3a says
Any security deposit received by such lessor shall be held in a separate, interest-bearing account in a bank, located within the commonwealth under such terms as will place such deposit beyond the claim of creditors of the lessor, including a foreclosing mortgagee or trustee in bankruptcy, and as will provide for its transfer to a subsequent owner of said property
An attorney would be typically required to understand what the italicized portions mean. A reasonable interpretation would be that you have to set up an escrow bank account on behalf of the tenant. To do that, though, the tenant must cooperate to some extent (providing a Social Security number, providing acceptable ID). There is no law requiring a tenant to cooperate, which apparently puts the landlord in a legal bind.
The trick is that the statute has been interpreted "functionally" in Karaa v. Kim 86 Mass. App. Ct. 714 citing Neihaus v. Maxwell 54 Mass. App. Ct. 558 as simply meaning that the landlord cannot deposit the security money into their own personal bank account. In Neihaus, the landlord handed the problem over to a property management company, which had in place suitable accounting procedures so that the desiderata of being beyond the claim of creditors, being in a bank in the commonwealth, and being separate, were satisfied. In the case of Karaa, the tenants did not ever supply a Social Security number: the court ruled that the tenants action did not excuse violation of the statute, stating "The failure of the tenants to provide a Social Security number did not preclude the Karaas from establishing a separate account in compliance with § 15B(3)(a)". A Massachussets attorney with specialization in this area would know this, and that is why one needs to hire an attorney.