A seller must disclose certain known issues to the property and you may be able to show that that mandatory disclosure was not made. If that is the case you should be able to set aside the contract and recover your deposit. While it is generally a buyer's responsibility to inspect a property before purchase, any known defect as severe as mold could give you grounds to void the contract if the seller had knowledge.
Further, there are provisions of the Virginia Landlord Tenant Act that are similar to the old common law implied warranty of habitability. While Virginia does not recognize an implied warranty of habitability in the landlord tenant relationship, there are numerous provisions that serve to protect tenants from unconscionable lease provisions and being stuck with mold. There are also provisions that give a tenant the right to have the landlord clean and correct the mold issue (if possible).
Basically you need to review your contract with a local attorney and explore your options. I do think you have a potential action here and it is definitely worth seeking a local lawyer to work with. If you do not have the means to hire an attorney, legal aid offices will often work with tenants concerning these issues.
Please reply if I can help further.
Remember to click ACCEPT only when you are satisfied with your answers. This is how we get paid for our time with your questions. I would also appreciate any positive feedback you could provide. If you are not satisfied then please reply to me so I can further assist you or find someone else to help. I am not your attorney. Therefore no attorney-client relationship exists and any communications on this website are not subject to the attorney-client privilege. For this reason, please do not divulge any personal information and use this site only for hypothetical questions. This forum is for general questions and answers and I cannot provide you with applicable law or legal opinions or advice in your jurisdiction. Please seek the advice of a competent attorney in your jurisdiction. While I can answer general questions and discuss general legal principles, I cannot give you legal advice in your state. The internet is a great place to get general information but should not be seen as a substitute for the attorney-client relationship or the services of a good lawyer in your state.