The IRS has a 180-day right of redemption. This means that the IRS has 180 days to pay the bank (in this case pay you back if you're the successful bidder) and take title to the property. This scenario is highly unlikely unless the house has substantial equity. You are correct to do your due diligence before buying. Most of the problems I see are people who have not done their due diligence.
This answer is for general informational purposes only and does not establish an attorney-client relationship. Please contact a licensed attorney in your state of residence. For more information on our services, please visit our website at www.yesnerlaw.com.
The Unites States of America (or "IRS" as you stated) has a superior lien to all real property, even when sold at a foreclosure auction.
Each property is sold subject to any past due property taxes, assessments, existing easements and restrictions, and any senior liens or judgments against the property.
You certainly need to keep 2 debts in mind when you bid on property at a judicial sale --> 1) PROPERTY TAXES and 2) HOA FEES!
The highest bidder at the auction becomes the owner of the real property, free and clear of interest of the former owner, but possibly encumbered by liens superior to the foreclosed mortgage (e.g., a senior mortgage or unpaid property taxes). Further legal action, such as an eviction, may be necessary to obtain possession of the premises if the former occupant fails to voluntarily vacate.
The delinquent HOA fees (if they exist) will NOT be part of the judicial sale and you may be completely unaware they exist. However, if you are the successful bidder at a judicial sale, the HOA will be the next entity who immediately approaches you with their hand extended wanting payment.
If HOA fees are unpaid, the HOA could immediately commence collection efforts and even initiate foreclosure against the property you just purchased. However, the tax lien should generally be settled from the funds simultaneously when possession is transferred.
I echo the answer of Charles Franklin above. It should also be noted that unlike first mortgagees that take title to property and are limited to owing the HOA the lesser of 1% of the original mortgage amount or 12 months of unpaid assessments (FL Stat. 720.3085), a third party investor who takes title at auction is responsible for all such unpaid assessments to the HOA. Thus it is imperative to find out if there is a claim of lien filed by the applicable HOA, if any. The same applies for condominiums, albeit under Florida Statutes Chapter 718.