On occasion, a lender will forgive some portion of a borrower's debt. The general tax rule that applies to any debt forgiveness is that the amount forgiven is treated as taxable income to the borrower. Some exceptions to this rule are available, but, until 2007, when a lender forgave all or part of a mortgage debt (such as in so-called "short sales," foreclosures and "workouts"), the borrower was required to pay tax on the debt forgiven.
A law enacted in 2007 provided temporary relief to troubled borrowers when some portion of mortgage debt is forgiven. That relief has expired and been extended several times. The last extension provided relief for debt forgiven through Dec. 31, 2016.