First mortgage isn’t the issue..
The issue is Recourse Debt or NON-Recourse debt.
Purchase Money loans are usually NON recourse debt.
(Refi Loans are RECOURSE debt)
Non-recourse loans: A non-recourse loan is a loan for which the lender’s only remedy in case of default is to repossess the property being financed or used as collateral.That is, the lender cannot pursue you personally in case of default.
Forgiveness of a non-recourse loan resulting from a foreclosure does NOT result in cancellation of debt income.
Taxable cancellation of debt income.(Note: As stated above, cancellation of debt income is not taxable in the case of non-recourse loans.)