Consuming whole-leaf aloe vera extract increases the odds of developing cancer of the large intestine, according to a study published in Toxicological Sciences. That finding might come as a surprise, considering that aloe vera has long been lauded for its health benefits, including soothing sunburns. Research even suggests that aloe vera gel can act as an anticarcinogen, reducing the odds of skin cancer when it is applied to the skin.

How can aloe vera both cause cancer and prevent it? It turns out the key is which part of the aloe vera leaf is used. Aloin, the potentially cancer-causing compound found in aloe, is present only in the outer part of the leaf, specifically the cells that line the inside surface of the peel of the aloe leaf, not in the gel located inside the leaf. The vast majority of aloe products, including almost all aloe products applied topically, contain only aloe gel and thus no aloin. These products have no cancer risk.

A small percentage of aloe vera products do utilize the entire aloe leaf. Aloe vera juice often is made from blended whole aloe leaves, for example. But even these products are very unlikely to contain dangerous amounts of aloin. That’s because companies that make whole-leaf aloe vera products almost always remove virtually all of the aloin through what’s known as a “decolorization” process involving activated charcoal filtration.

What to do: You can use aloe vera gel. But before consuming a “whole leaf” aloe vera product, read its packaging to confirm that it has been “decolorized.” If the packaging mentions an aloin concentration, this should be no more than 10 parts per million.