You have plenty to worry about when buying a home and applying for a mortgage: How low are mortgage interest rates? Where will you get the money for a down payment? Is your credit score high enough?

But there are hidden dangers involved in buying a home, too, everything from old underground fuel oil tanks that might one day start seeping into the soil of your backyard to Vietnam War-era aluminum wiring that could cause a fire inside your home’s walls.

Buying any home involves risk. And taking out any mortgage type to pay for that home will likely be the biggest debt you take on. You want to make sure, then, that you can minimize the most hidden risks of owning a home.

Underground storage tanks

There are few surprises unpleasant as discovering after you've bought your home that an underground storage tank is buried deep under the surface of your backyard. The problem with these tanks, which stored oil before homes were heated electrically, is that their metal skins can disintegrate. The oil that they hold can then seep into the ground, causing environmental contamination.

"As you are unlikely to have any information on the type, condition and possible environmental damage present with one of these tanks, you run the risk of a costly cleanup," said Eugene Gamble, a UK-based real estate investor and founder of weFundyourFLIPS.com.

Scott Brown, owner of Brightside Home Inspections in Syracuse, New York, said that this fee usually runs near $10,000. Unfortunately, it's not easy for buyers to spot the signs of an underground tank until it starts leaking.

"Buried oil tanks are very difficult to uncover," Brown said. "There may be two pipes coming out of the yard somewhat randomly. But if the tank was 'shut down,' there might not be any evidence until it's too late."

There is hope, though. Brown said that a good home inspector will generally know if a property is a candidate to have had a buried oil tank in the past. The inspector can then look for signs of potential leaking during the inspection, Brown said.

Aluminum wiring

You certainly don't want a fire to start in the walls of your newly bought home. Depending on the wire snaking through them, though, the odds of a fire might be higher than you'd like.

Brown said that aluminum wiring was common in homes built between 1965 and 1973 because of copper shortages resulting from the United States' involvement in the Vietnam War. Aluminum wiring is more likely to lead to a future fire than is cooper wiring, Brown said.

"the good news is aluminum wiring can be fixed," Brown said. "The bad news is it is fairly expensive. If you're buying a home built in this era, make sure to raise the issue with your home inspector."

Code violations and permit issues

You might love that sun porch that the previous owner of your home built a year ago. But what if the previous owner took shortcuts on the construction and violated the building codes of your municipality? If your city's building department never got around to inspecting this newly built porch, you might be responsible for fixing any violations that inspectors find when they do come around.

"If work was done but not permitted, you may run into serious issues down the road," said Jeff Henninger, a real estate attorney in Tinton Falls, New Jersey.

Henninger remembers when one of clients was looking at a home with an attic that had been converted into a bedroom. Henninger asked the real estate agent if the space could officially be called a bedroom.

"The response was 'good question,'" Henninger said. "Question everything and ask for permits."

Jim Esposito, a real estate agent with Intercoastal Realty in Fort Lauderdale, Florida, said that he has seen this problem often enough that he includes a clause with his contracts stating that the home sellers are responsible for any open or expired permits.

"I've seen cases where the homeowner pulled a permit for work on the house but never had the local building department inspect when it was completed," Esposito said. "If the work has not been done correctly, or if building codes have changed in the intervening period, the buyer could be on the hook for serious money."

Hidden water issues

Water, and flooding, can cause plenty of damage to a home, and can do it quickly. That's why Peter Di Natale, president of Cold Spring, New York-based builder and general contractor Peter Di Natale & Associates, recommends that buyers and their home inspectors look for signs that a home isn't prepared for bad, stormy weather.

For instance, floods, whether from storms, melting snow or water-main breaks, will hit homes sitting on downhill slopes the hardest, Di Natale said.

"If you're buying in an area known for bad weather, you should check or have someone check how level the ground is," Di Natale said. "It's not difficult to re-grade the dirt and grass near the house to create a downhill slope away from it. Seems like a reasonable alternative to a flooded basement."

Termites (and other pests)

Termites can cause plenty of damage to your home. The problem is, even home inspectors won't always catch the signs that termites are present.

Henninger said that some mortgage lenders require a termite inspection. But he recommends that buyers always request one of these, even if a lender doesn't require it.

Dave Vallee, owner of Roof Right Solutions in Calgary, Alberta, said that buyers should look for any openings or cracks in the exterior of their homes. These small entryways are key targets for small animals like racoons, squirrels, mice or rats.

"If left unattended, animals and rodents can chew through wiring behind your walls, posing an electrical fire hazard," Valle said. "A thorough scan for these key areas around the exterior of the home can save you a huge headache."