U.S. Bank is the country's fifth-largest commercial bank, with 3,000 branches in 25 states. It's also "one of the largest slumlords in the City of Los Angeles," according to the L.A. city attorney's office.

In a complaint filed last month, the office accused U.S. Bank of failing to maintain more than 170 foreclosed properties, blighting neighborhoods, decreasing property values and increasing crime rates.

The allegations are similar to those made in a lawsuit filed by the city attorney's office last year against Deutsche Bank (DB), as well as other complaints from activists around the country who say their communities have suffered as neglected foreclosures deteriorate in the aftermath of the housing bubble.

It's difficult to quantify the issue nationally, but thousands of homes may be at risk of falling into disrepair.

Roughly 620,000 foreclosed properties in the United States are owned by lenders, according to RealtyTrac. The number of these properties, known as REOs, or "real estate owned," surged after the housing bubble but has since begun to drop, down from over one million in January 2011.

Still, of those 620,000 houses, 24% had been waiting for a new buyer for two years or more, and 11% for three years or more.

Such homes can be no problem for neighbors provided they are maintained properly. But "the longer a property spends in REO status, the greater risk of falling into disrepair and dragging down the quality of the neighborhood and value of surrounding homes," said Daren Blomquist, vice president of RealtyTrac.

A tangled web: In the Los Angeles case, the city attorney's office claims that U.S. Bank's liability could be "in the hundreds of millions of dollars."

U.S. Bank, however, says the city's lawsuit targets the wrong party.

Following a foreclosure, bank spokesman Tom Joyce said, the mortgage servicer -- the institution that's been collecting payments on a loan -- is responsible for maintenance. U.S. Bank, he said, is not the servicer for the foreclosed homes in question, but the trustee.

"At the end of the day, it's only the servicer that can foreclose on a home, and it's only the servicer that's responsible for the upkeep of those properties," Joyce said.

Deutsche Bank spokesman Duncan King echoed U.S. Bank's comments, saying that the Los Angeles city attorney "sued the wrong party," and that other institutions worked as servicers for the properties at issue.

In some cases, banks hold their mortgage loans on their own books. Other times, the loans are securitized -- pooled together with other loans. In those instances, a trustee distributes payments from servicers to the bondholders who own the mortgages.

There are also the government-controlled housing finance firms, Fannie Mae and Freddie Mac, which take responsibility following foreclosures for the properties on which they have guaranteed mortgages.

Los Angeles Assistant City Attorney Tina Hess said trustees are required to take action when servicers of foreclosed properties fail to maintain them. The complexity of the modern housing market -- where the owner of a mortgage loan, the servicer and the trustee might all be different -- has exacerbated the problem, she added.

Related: New foreclosures jump 9%

Collateral damage: The issue extends beyond Los Angeles. Jennifer Wilcox, who lives in the middle-class Atlanta neighborhood of Ormewood Park, watched the house next door deteriorate for months after her neighbor left in 2009 without anyone taking action.

"We were seeing rodents and electrical wiring coming out the roof of the house," Wilcox said. "We just kind of assumed that the bank would start maintaining it, and they never did."

Wilcox eventually decided to take matters into her own hands, looking up the ownership details for the property on the county tax commissioner's website. Although the home is owned by Bank of America (BAC), Wilcox says BofA attempted to wash its hands of the maintenance responsibilities, telling her that the servicing rights were held by Green Tree Servicing.

Bank of America spokeswoman Jumana Bauwens told CNNMoney that there were in fact two mortgages on the property, the first serviced by BofA and the second by Green Tree. She called the home's handling "a complex situation," and said Bank of America was pushing Green Tree to handle future maintenance issues.

"It was an unfortunate set of circumstances that this fell off our radar, and for that we apologize to the neighbors," Bauwens said. "This is not an example of how we want our houses maintained, and we will do what's necessary to fix it between us and Green Tree."

Green Tree did not respond to requests for comment.

Related: Whistleblowers win $46.5 million

The National Fair Housing Alliance, a Washington-based nonprofit, says the neglect of foreclosed properties is a problem in many parts of the country.

The group filed complaints earlier this year with the Department of Housing and Urban Development against U.S. Bank and Wells Fargo (WFC), accusing them of failing to maintain foreclosed homes in Atlanta, Miami, Oakland, Calif., Washington, D.C., and other cities. Foreclosures in minority communities, the group said, were at greater risk of falling into disrepair than those in white neighborhoods.

Of 218 foreclosures owned by Wells Fargo that the NFHA inspected around the country, the group documented serious deficiencies in 67% of properties in minority communities, compared with 41% in white communities. The group reported similar findings among the 177 U.S. Bank properties it inspected.

Wells Fargo spokesman Tom Goyda said the bank "conducts all lending- and servicing-related activities in a fair and consistent manner without regard to race."

"When Wells Fargo acquires ownership of a property through foreclosure, we immediately inspect it to identify and address any health and safety issues. Then we work to make any repairs or renovations that are necessary to prepare it for sale," Goyda said.

U.S. Bank's Joyce said his firm was the trustee for most of the homes identified in the NFHA complaint, and therefore not responsible for them.

"The others, we are looking through those, in conversation with NFHA, to make sure that there are no issues with properties that we presently own," Joyce added.

For neighbors, part of the challenge in getting such properties addressed can be just figuring out who's responsible. Wilcox said that after contacting local government officials and dealing extensively with Green Tree and Bank of America, she's not sure what else she can do.

"I'm just hopeful that whoever owns the property hurries up and takes responsibility for it, because it's just a nightmare to live next door to," she said.