First, the Seller's agent should have researched what was owed on the property. And the Seller should have disclosed the potential for a short sale. I don't know how they managed to purchase with bad credit, maybe its not in their name. In any case you can still purchase the home if that is what you want and possibly for less. You really need a good short sale attorney who knows the rules and works with them all the time.
The only problem for you is timing and if you can and want to wait for the house. If you love it then go for it. If not you can cancel the purchase. Good luck and don't let this stop you from making a purchase. Their may be a better home out there and this was the universe getting you out of the deal.
Please make sure the contract does not include the wording "Subject to Bank Approval" or Subject to Third Party Approval". These words would qualify for dislcosing a short sale. Lots of luck to you and let me know if there is anything else I can answer for you.
Once again there are reasons to hire a REALTOR folks and involve a real estate attorney, and this is a prime example of why you should.
The little details are what make a difference in this situation. Either way, the seller cannot "pull a fast one" on someone when it comes to contracts. If a seller neglects to disclose required information that could be a breach of contract.
I can't give you actual advice because there are so many factors involved, you should definitely check with your realtor to make sure everything on your end is good.