Peanuts themselves are not directly linked to causing cancer. However, they can sometimes be contaminated with a type of mold called Aspergillus flavus, which produces a substance called aflatoxin. Aflatoxin is a potent carcinogen, and chronic exposure to it is associated with an increased risk of liver cancer. Proper storage and quality control measures are essential to minimize aflatoxin contamination in peanuts.