You may owe taxes due to the foreclosure or short sale of your home, depending on the circumstances.
Go to this section in Credit Karma Tax: Cancellation of Debt
According to the IRS, both foreclosures and short sales are considered taxable real estate transactions.
If the lender forgives all or part of the mortgage debt, the cancellation of the excess debt may count as taxable income and you should receive a Form 1099-C from the lender. The difference between the canceled debt amount and the fair market value of the property must be included in the gross income reported on your tax return unless an exception or exclusion applies. In certain circumstances, such as foreclosure of your primary residence when certain conditions are met, some or all of the cancellation of debt may not be taxable.