The dangers are too numerous to list, but here's a few highlights:
1) undislcosed liens
2) unpaid bills for electricity, water, taxes, etc. Even if you're not required to pay them yourself, expect to do a lot of paperwork to fix the previous owners problems.
3) maintenance - it hasn't been done. Every appliance will probably need service.
4) unpermitted "improvements", nearly every foreclosure in South Florida was illegally subdivided as folks tried to save their homes. Bad electrical, plumbing, construction, etc. is rampant.
5) potential for chinese drywall. (even if it's not new construction, did the owner renovate?)
6) clouded title.
If you need to ask these questions, you should consider finding a buyer's agent to advise you. Buying a foreclosure is much riskier than a regular sale, and you need to make sure the property is enough of a bargain to be worth that risk.