Dietary supplements containing potentially dangerous prescription drug ingredients may still be for sale even years after safety recalls, a study found.

In supplements bought online, researchers detected hidden steroids, similar ingredients to Viagra and Prozac and a weight loss drug linked with heart attacks.

They tested 27 products promising big muscles, sexual prowess, weight loss and more. Of those, 18 contained ingredients not approved for over-the-counter use; 17 still had the same drug that prompted the recalls.

Manufacturers are putting profit ahead of consumer health, but lax oversight by the U.S. Food and Drug Administration is contributing to the problem, said lead author Dr. Pieter Cohen, an internist and researcher at Cambridge Health Alliance, a Boston-area health care system.

The tested supplements were recalled by manufacturers after FDA raised concerns about drugs in their products. This type of recall is usually voluntary, involving products that could potentially cause serious health problems and even death. The FDA's role includes assessing whether recalls successfully remove potentially unsafe products from the market.

"There should be significant legal and financial consequences for manufacturers who the FDA finds to be continuing to sell these spiked supplements," Cohen said.

Unlike prescription drugs, dietary supplements don't need FDA approval before they are marketed. Still, their labels must list all ingredients and manufacturers are not allowed to sell products that are "adulterated or misbranded," the agency's website say

The study was published in Wednesday's Journal of the American Medical Association. The authors say laws that increase FDA's enforcement powers may be needed to fix the problem.

In response to the study, the FDA said it has issued hundreds of consumer alerts warning about tainted products, sent warning letters to supplement makers "and pursued civil and criminal enforcement" against those illegally marketed products. Deterring manufacturers is sometimes challenging because they are often difficult to locate and some are overseas, the agency said.

The researchers bought 27 of the 274 supplements recalled from 2009 to 2012. The products were purchased in summer 2013 from manufacturers' websites or other online retailers. An Oregon research laboratory tested them. Whether any consumers were harmed by using the tainted supplements was beyond the study's scope.

Among the 27 products:

-Six weight loss supplements contained sibutramine or a substance similar to the diet drug removed from the U.S. market in 2010 after it was linked with heart attacks and strokes. Two also contained the active ingredient in Prozac.

-Ten body-building supplements contained anabolic steroids or related compounds, which have been linked with side effects including prostate cancer, aggression and infertility.

-One sexual enhancement product contained sildenafil, the active ingredient in Viagra, which is not recommended for those taking some heart medicines.

The Consumer Healthcare Products Association, a supplements trade group, said it encourages federal regulators to crack down on "rogue" companies.

"Unapproved or adulterated drugs' masquerading as lawful supplements is a threat to public health and to consumer confidence in the supplement industry," Scott Melville, the association's president and CEO, said in an emailed statement.