(CNN) Medical marijuana is now legal in 29 states and the District of Columbia. But the law is not quite as black and white regarding marijuana extracts such as cannabidiol. CBD is one of the active ingredients in cannabis, increasingly thought to offer wide-ranging health benefits, with few side effects and little risk of addiction or abuse.

"More and more evidence is coming out that CBD can be helpful for a variety of conditions, from anxiety to inflammation to seizures and epilepsy," said Marcel Bonn-Miller , an adjunct assistant professor of psychology in psychiatry at the University of Pennsylvania

No surprise, dozens of companies are jumping on the proverbial bandwagon, peddling these products to consumers who have high hopes that they will help treat myriad ailments, from chronic pain to PTSD.

Even though medical marijuana is legal in more than half of US states, it remains illegal under federal law. As a result, the Food and Drug Administration does not regulate derivatives of the plant, including CBD extracts.

Bonn-Miller believed that a "systematic evaluation" of the products on the market was needed so consumers would know exactly what they were buying. Today, "It's the Wild West," he said.

For a study published today in the Journal of the American Medical Association, Bonn-Miller and his team bought 84 commercially available CBD products on the internet and had them chemically analyzed by an independent lab.

The researchers found that only 31% of the products tested contained the precise amount of CBD advertised on the label (within the acceptable margin of error), while 26% contained less CBD than the label indicated and 43% contained more.

Accuracy of labeling, it turned out, was also associated with product type. About half of the CBD extract oils were labeled inaccurately. Nearly 90% of the vaporization liquids were labeled inaccurately. Tinctures (alcoholic extracts) were roughly equally likely to be over-, under- or accurately labeled.

JUST WATCHED The quick hit history of medical marijuana Replay More Videos ... MUST WATCH The quick hit history of medical marijuana 01:56

"Was I shocked? No," Bonn-Miller said. "Was I disappointed? Yeah. It just got me thinking, we need oversight of this industry. ... (It's) one thing on the recreational side, but here we're talking about something that people are using almost exclusively medicinally. You don't get high off of CBD."

That's what made another finding from the study stand out: "Concentration of unlabeled cannabinoids was generally low; however, THC was detected in 18 of the 84 samples tested," according to the paper.

THC, or tetrahydrocannabinol, has its own medical applications but, unlike CBD, is psychoactive and can cause a "high."

Unknowingly ingesting THC, Bonn-Miller said, could result in side effects such as trouble sleeping and cognitive impairment. It could also have unintended consequences, such as positive drug tests.

"As things stand now, the supplement industry overall is not regulated," CNN Chief Medical Correspondent Dr. Sanjay Gupta said. "You don't always know what you're getting, how much you're getting or even if the active ingredients are in there at all. With medical marijuana, it is almost the opposite situation at the federal level. It is highly regulated."

Bonn-Miller said increased regulation is exactly the kind of change he hopes his study will initiate.

"If the FDA regulated this industry, we would be way better off," he said. "They're good at regulating things. When you go and buy a prescription at a pharmacy, you know what you're getting. ... (It's the) same thing for food. When you get a pack of Doritos or a Hershey bar, you know what it is."

Perhaps in a sign of what's to come, last week the FDA issued warning letters to four companies that the agency said are "illegally selling products (derived from marijuana) online that claim to prevent, diagnose, treat, or cure cancer without evidence to support these outcomes."

Follow CNN Health on Facebook and Twitter See the latest news and share your comments with CNN Health on Facebook and Twitter.

Until these products are officially regulated, it's buyer beware.

Before purchasing any pot pills, potions or lotions, first check the laws where you live. Then, make sure you're ordering from a reputable dealer. Don't be fooled by bogus offers or sham celebrity endorsements.

Unless you're fully confident in the ingredients of the product, Bonn-Miller suggests following the adage "start low, go slow" -- referring to dosage. Of course, your best bet is to always talk to your doctor before starting or stopping any medications or supplements, including CBD.