The old-fashioned treat can be particularly risky for adults over 40, the FDA says. Eating 2 ounces of black licorice a day for at least two weeks could land people in this age group in the hospital with an irregular heart rhythm or arrhythmia.

"This is equal to eating three 1-inch pieces of black licorice for 14 days in a row," Kristi King, senior clinical dietitian at Texas Children's Hospital, told CBS News.

The FDA explained in a warning published on its website this week that black licorice contains a compound called glycyrrhizin (pronounced gliss-er-EYE-zin), the sweetening compound derived from licorice root, which can cause potassium levels in the body to fall. When this happens, some people can experience abnormal heart rhythms, as well as high blood pressure, swelling, lethargy, and even congestive heart failure.

These health issues linked to consuming large quantities of black licorice were documented in a 2017 study published in the Journal of Human Hypertension.

People who have heart disease or are at risk of developing heart disease are more prone to the negative effects of black licorice, Kind said.

Linda Katz, M.D., director of the FDA's Center for Food Safety & Applied Nutrition, says the agency received a report last year of one person who had health problems after eating black licorice.

The good news is that potassium levels are usually restored once people stop eating the candy, and the associated health issues aren't permanent.

But if you're a black licorice aficionado, the FDA offers the following advice:

No matter what your age, don't eat large amounts of black licorice in one sitting.

If you have been eating a lot of black licorice and experience an irregular heart rhythm or muscle weakness, stop eating the candy immediately and contact your doctor.

Black licorice can interact with certain medications, herbs, and dietary supplements. Talk to your health care provider if you have questions about possible interactions with a drug or supplement you take.

"Candy isn't something we should be eating on a regular basis anyway, nonetheless every day," King said, "so we want to make sure that we're consuming it in moderation."