If your house goes through FORECLOSURE, all liens should be satisfied.
As a rule, the 1st Lienholder will have to take care of the other Liens.
This is too important, for you not to take it to an Attorney;
particularly since N.Y. is a RECOURSE State.
Good luck and may God bless