General Electric is still haunted by its disastrous adventure in subprime mortgage lending more than a decade ago.

GE (GE) shut down WMC, its mortgage business, in 2007 after the market for lending to risky borrowers collapsed. But the business still faces legal trouble, including lawsuits from investors and an investigation by the Justice Department.

GE warned in a filing on Tuesday evening that WMC could file for bankruptcy if it loses one of those lawsuits.

This appears to be the first time GE has said it’s exploring bankruptcy for the defunct mortgage business. WMC was reportedly the nation’s sixth-biggest subprime lender when it was acquired by GE in 2004 under former CEO Jeff Immelt.

Investors lost billions of dollars when subprime loans went bust across the country during the foreclosure crisis. Federal bank regulators ranked WMC as one of the worst subprime mortgage lenders in major metro areas, with more than 10,000 foreclosures between 2005 and 2007.

The investors who are suing claim that WMC misrepresented the quality of the mortgages it sold. The investors are demanding that WMC buy the mortgages back.

For instance, TMI Trust Company, a successor to the…