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.

Related: Workers, shareholders call GE an 'embarrassment'

For instance, TMI Trust Company, a successor to the Law Debenture Trust of New York, has alleged losses of more than $425 million on about $800 million worth of WMC mortgage loans. Closing arguments in the trial are scheduled for June 12, GE said.

GE said WMC may file for bankruptcy if it is found liable.

The TMI case is one of four pending lawsuits against WMC. GE warned in February that WMC's losses on various legal fronts, including that case, "could be in an amount exceeding the total value of WMC's assets."

GE declined to comment beyond its filings.

Even if WMC files for bankruptcy, GE may still be on the hook for the mortgage unit's problems.

"That's not going to change with the entity filing for bankruptcy," said Douglas Baird, a law professor at the University of Chicago. "The subsidiary can just disappear."

Related: GE pressured to fire auditor after 109 years

WMC has emerged in recent months as one of the biggest headaches in GE's vast business empire. GE set aside another $1.5 billion in April to cover potential losses from the Justice Department investigation. GE said settlement discussions are under way.

The WMC bankruptcy warning and the series of lawsuits suggest that GE's losses on the mortgage business could continue to rise.

Indeed, GE said in the filing on Tuesday that WMC estimates possible losses of up to $500 million above its reserves. However, GE said the estimate "involves significant judgment" given the "range of uncertainties and unpredictable outcomes inherent in litigation."

For instance, it's not clear how much a settlement with the Justice Department would cost GE. GE noted the "wide variety and broad range of penalties" that banks have faced in prior cases. Barclays (BCS) agreed to pay $2 billion in March for allegedly deceiving investors about the quality of its pre-crisis mortgage deals.