A month later, a study published in JAMA revealed that products marketed as SARMs were frequently misbranded and tainted with unlisted ingredients. Out of 44 products that were purchased online and analyzed, only about half contained an actual SARM, while 10 percent contained none at all. Roughly 40 percent had other hormones and unapproved drugs. Several contained a drug that was abandoned by GlaxoSmithKline a decade ago after it was found to cause cancer in animals.

The long-term consequences of using SARMs are largely unknown, and people who purchase products marketed as them cannot be entirely sure what they are putting in their bodies, said Dr. Shalender Bhasin, the director of research programs in men’s health, aging and metabolism at Brigham and Women’s Hospital and an author of the JAMA report.

“We don’t know whether these compounds are safe,” he said, “but we do know that some of them have side effects.”

That has not stopped many people from experimenting with them.

Thaddeus Owen, 42, a self-described biohackerwho lives in Saint Paul, Minn., began using SARMs in 2016 in combination with a diet and exercise program. He said that the pills helped him pack on five pounds of muscle in four weeks, which he documented on his website, “PrimalHacker.” He argued that informed adults should be allowed “to experiment on ourselves and improve our biology,” but added, “this is definitely a use-at-your-own-risk type of supplement.”

Anti-doping officials have known about SARMs for some time and have seen an increasing number of elite athletes using them. Since 2015, the United States Anti-Doping Agency has imposed sanctions on more than two dozen track and field stars, weight lifters, cyclists, mixed martial artists and others for testing positive for a variety of SARMs, most frequently one called ostarine.