Unlicensed antibiotics are being advertised on social media as treatment for sexually transmitted infections and sold at the wrong dose.
A BBC reporter was sold the drugs by a man who said he got them from his uncle's pharmacy overseas.
The man, who fled when confronted, said he had several celebrity clients.
Government medicine regulator Alastair Jeffrey said taking the pills was "not a gamble I'd be willing to take".
Mr Jeffrey said there was a great deal of concern around selling "an unlicensed medicine; you've no idea where it's come from".
"You don't know how it's been manufactured; you don't know where it's been stored or transported; it may have been sitting in some cargo container in 40 degree heat that could have an impact on the active pharmaceutical ingredient."
A BBC Inside Out West Midlands reporter paid £15 for antibiotics to be posted to him after replying to one online advert, claiming to have contracted chlamydia.
He also received a text message with instructions on how to take them: four white azithromycin tablets first followed by one green doxycycline tablet, twice a day for 10 days.
Our reporter then asked to meet the salesman, called Anthony, claiming he had syphilis.
In a cafe near Clapham Junction, Anthony handed over more tablets for £25, telling the undercover reporter to have "lots of water, no alcohol whatsoever and do not participate in any sexual activity".
During a second meeting, where the reporter took along a colleague claiming to have genital herpes, the salesman handed over what he said was a 10-day treatment consisting of anti-viral drugs.
When asked about the medicines dispensed Dr Suneeta Soni, of the British Association of Sexual Health and HIV, said the dosages were wrong, and some of the treatments were no longer used to treat the conditions because antibiotic resistance had made them ineffective.
The Medicines and Healthcare products Regulatory Agency confirmed the sale of all the tablets in question was illegal because the company which made them did not hold a UK licence.
Dr Meg Boothby, a consultant in Sexual Health and HIV Medicine in Birmingham, urged people to seek professional medical advice if they thought they had a sexually transmitted infection.
"People shouldn't feel embarrassed because actually looking after your sexual health, actually deciding you want to get checked out and find out if you do have an infection or not, is a very responsible thing to do," she said.
You can see the full story on BBC Inside Out at 19:30 GMT on Monday 4 March on BBC One in the West Midlands and afterwards on iPlayer.
Follow BBC West Midlands on Facebook, on Twitter, and sign up for local news updates direct to your phone.