Meta Description
The same genus of fungi that gives miso and soy sauce their depth of flavor can, under different conditions, produce one of the most potent carcinogens in the natural world. The difference is not the organism — it is the environment. Here is what that means for the food we eat.
Two Bowls of Miso. One Uncomfortable Truth.
Somewhere in Japan, a fermentation master is tending a batch of miso that has been aging for months. The process is ancient — over a thousand years old — and it depends entirely on a microscopic fungus called Aspergillus oryzae, known in Japanese as koji. This fungus produces the enzymes that break down soybean proteins into amino acids, releasing the complex, savory depth of flavor that defines the paste. Without it, there is no miso. Without it, there is no soy sauce, no sake, no mirin.
Somewhere else, in a warehouse where improperly dried peanuts are being stored in humid conditions, a closely related fungus called Aspergillus flavus is quietly producing aflatoxin B1 — one of the most potent naturally occurring carcinogens known to science, classified as a Group 1 human carcinogen by the International Agency for Research on Cancer.
The two scenarios feel like opposites. They are not.
Aspergillus oryzae and Aspergillus flavus share 99.5% of their genome. They are, in biological terms, nearly the same organism. What separates the bowl of miso from the contaminated peanut is not the fungus. It is the system the fungus is operating within.

What Fungi Actually Do to Food
To understand why the same organism can produce such different outcomes, it helps to understand what fungi are actually doing when they interact with food.
Fungi do not consume food the way animals do. They secrete enzymes into the material around them, breaking down complex biological structures — proteins, carbohydrates, fats — into simpler compounds that they can then absorb. This process is efficient, targeted, and continuous. It is also, from the perspective of the food itself, transformative.
In fermentation, these enzymatic reactions are harnessed deliberately. Aspergillus oryzae produces amylases, proteases, and lipases — enzymes that break down starches, proteins, and fats respectively. In the production of sake, those amylases convert rice starch into fermentable sugars. In miso and soy sauce, the proteases unlock amino acids that would otherwise remain locked in soybean protein, creating the umami flavor that no synthetic shortcut has fully replicated.
In spoilage, the same enzymatic machinery runs without guidance. Nutrients become accessible not to a fermentation vessel but to contaminating organisms. Textures degrade. Off-flavors develop. And in some cases, fungi produce secondary metabolites — compounds that are not part of their primary metabolic activity but emerge under specific environmental stress — that are harmful to humans.
One of the most recognizable signals of this process is smell. A 2024 review in Food Chemistry identified the specific volatile organic compounds responsible for moldy odors in food — primarily C8-alcohols and ketones, along with terpene compounds such as geosmin. These MVOCs (moldy volatile organic compounds) are secondary metabolites released by fungi as they grow, and they do more than signal spoilage: some are directly cytotoxic, others promote the accumulation of mycotoxins, and all of them represent the chemical footprint of a fungal system operating outside of controlled conditions.
The mechanism is the same in both cases. The outcome is determined by who is steering.
The Aflatoxin Problem
Aflatoxins are produced primarily by Aspergillus flavus and Aspergillus parasiticus when growing on crops under conditions of high humidity, warm temperatures, and mechanical damage to the grain or nut surface. Maize, peanuts, tree nuts, and certain spices are particularly vulnerable.
The health implications are serious. Aflatoxin B1, the most potent of the group, is associated with hepatocellular carcinoma — liver cancer. Chronic low-level exposure, common in parts of Sub-Saharan Africa, Southeast Asia, and Latin America where storage infrastructure is limited, is linked to measurable increases in cancer risk. Acute high-level exposure causes aflatoxicosis, a potentially fatal condition.
What makes aflatoxins particularly difficult to manage is that they are chemically stable. They survive most cooking processes, persist through roasting and pasteurization, and can accumulate in animal products — most notably aflatoxin M1, a metabolite of AFB1, which appears in the milk of animals that have consumed contaminated feed.
The conditions that promote aflatoxin production are well understood: inadequate drying before storage, high ambient humidity, physical damage to crops that gives fungi an entry point. These are not exotic failures. They are routine realities in agricultural systems under climate stress.

Control Is the Variable That Changes Everything
The central insight of this research is deceptively simple: the fungus itself is not the problem. The problem — or the opportunity — is the conditions surrounding it.
This is well illustrated by the relationship between A. oryzae and A. flavus. Despite their near-identical genomes, A. oryzae as used in traditional fermentation has not been shown to produce aflatoxins under properly managed conditions. Centuries of selection and careful environmental control have guided this strain along biochemical pathways that produce flavor compounds rather than toxins. The gene sequences for aflatoxin production are largely present — but the conditions that would activate them are precisely what fermentation masters have learned to prevent.
Temperature determines the rate and direction of enzymatic activity. Moisture availability controls fungal growth and, critically, the likelihood of stress responses that trigger toxin production. Oxygen levels influence which metabolic pathways are active. Substrate composition — what the fungus is growing on — shapes what compounds it produces.
Change any of these variables significantly, and the outcome shifts. A slight increase in humidity during storage can initiate growth that would not otherwise occur. A drop in oxygen availability can redirect metabolism toward anaerobic pathways with different end products. The fungus is, in effect, a biological processor that reflects the inputs of its environment.
The Same Logic, Applied Forward
Understanding fungi as responsive systems rather than fixed threats has practical consequences that extend well beyond food safety.
In food innovation, it opens the possibility of designing fermentation processes that guide fungi toward specific biochemical outcomes — producing novel flavors, textures, or functional compounds that would not emerge from conventional processing. Researchers are already exploring the use of guided fungal fermentation to transform agricultural byproducts — crop residues, processing waste — into ingredients with nutritional or functional value. The same enzymatic capability that makes fungi effective decomposers in natural ecosystems makes them effective processors in circular food systems.
In food safety, it shifts the strategy from elimination to control. Fungi cannot be removed from the food environment — they are too widespread, too persistent, and in many cases too valuable. The goal is to design conditions that prevent harmful species from gaining a foothold, and to ensure that the species present are operating along beneficial rather than harmful pathways.
This includes an emerging approach: using non-toxigenic strains of Aspergillus as competitors to crowd out toxigenic ones. Research has demonstrated that A. oryzae strains can inhibit aflatoxin production by A. flavus in peanuts, essentially deploying a fermentation-adapted fungus as a biological control agent against its dangerous relative.

A Shift in How We Think About Microbes
What this research ultimately reflects is a broader shift in how science and industry are learning to think about microorganisms.
The older model was largely adversarial: microbes were contaminants to be eliminated, surfaces to be sterilized, risks to be controlled through exclusion. That model has its place — hygiene and contamination prevention remain essential. But it is incomplete.
The more useful model treats microorganisms as systems to be understood and designed around. Fungi in particular, with their remarkable enzymatic diversity and their sensitivity to environmental conditions, are not passive threats but active participants in food systems that can be guided, directed, and deployed.
That transition — from elimination to precision control — is already well underway in fermentation science. It is now beginning to reshape food safety strategy, agricultural practice, and sustainable manufacturing.
The line between flavor and risk is real. But it is drawn not by the organism, and not by fate. It is drawn by the conditions we create — or fail to.

FAQ: Fungi in Food Systems
Q: Are all molds in food dangerous? No. Many fungi are essential to food production and have been used safely for centuries. Aspergillus oryzae, for example, is the foundation of miso, soy sauce, and sake production. Whether a fungus is beneficial or harmful depends on the species, the conditions, and how the process is managed.
Q: What are mycotoxins and why are they dangerous? Mycotoxins are toxic secondary metabolites produced by certain fungi under specific environmental conditions — typically stress-related. Aflatoxins, produced by Aspergillus flavus and A. parasiticus, are particularly dangerous: aflatoxin B1 is a Group 1 human carcinogen associated with liver cancer. They are chemically stable and survive most cooking and processing.
Q: How similar are the beneficial and harmful Aspergillus species? Remarkably similar. Aspergillus oryzae and Aspergillus flavus share 99.5% genome-wide nucleotide similarity. The difference in their behavior is not primarily genetic — it is environmental. The conditions of controlled fermentation guide A. oryzae along pathways that produce flavor compounds rather than toxins.
Q: Can fungal growth in food be prevented entirely? No. Fungi are ubiquitous in the environment and cannot be eliminated from food systems. The practical goal is to control conditions — temperature, moisture, oxygen, substrate — to prevent harmful species from establishing and to guide beneficial species toward desired outcomes.
Q: What is aflatoxin contamination and who is most affected? Aflatoxin contamination occurs when A. flavus grows on inadequately stored crops — particularly maize, peanuts, and tree nuts — under humid, warm conditions. It is especially prevalent in parts of Sub-Saharan Africa, Southeast Asia, and Latin America, where storage infrastructure and monitoring are limited. Chronic exposure is linked to liver cancer; acute exposure causes aflatoxicosis.
Q: Can fungi be used to control other harmful fungi? Yes — this is an emerging area of research. Studies have shown that non-toxigenic Aspergillus oryzae strains can inhibit aflatoxin production by A. flavus in crops like peanuts, essentially using a beneficial fungal strain as a biological competitor against its dangerous relative.
References
Academic Sources
- Gong et al. (2024). Moldy odors in food — a review. Food Chemistry, 140210. https://doi.org/10.1016/j.foodchem.2024.140210
- Liu et al. (2024). The postbiotic potential of Aspergillus oryzae — a narrative review. Frontiers in Microbiology. https://www.frontiersin.org/journals/microbiology/articles/10.3389/fmicb.2024.1452725/full
- Tian et al. (2022). Mycotoxins in soybean-based foods fermented with filamentous fungi. Comprehensive Reviews in Food Science and Food Safety. https://ift.onlinelibrary.wiley.com/doi/10.1111/1541-4337.13032
- Fang et al. (2025). A comprehensive review of mycotoxins, their toxicity, and innovative detoxification methods. PMC. https://pmc.ncbi.nlm.nih.gov/articles/PMC11954124/
- Liang et al. (2025). Recent Progress of Mycotoxin in Various Food Products. PMC. https://pmc.ncbi.nlm.nih.gov/articles/PMC11898784/
- Drott et al. (2018). Controlling aflatoxin contamination by a soy-fermenting Aspergillus oryzae strain. Scientific Reports. https://www.nature.com/articles/s41598-018-35246-1
- Tanaka et al. (2002). Traditional Japanese fermented foods free from mycotoxin contamination. Mycotoxin Research. https://link.springer.com/article/10.1007/BF02959268
- Tran et al. (2022). Mycotoxins in Southeast Asian fermented foods. npj Science of Food. https://www.nature.com/articles/s41538-022-00152-4
Official Sources
- WHO — Mycotoxins fact sheet: https://www.who.int/news-room/fact-sheets/detail/mycotoxins
- FDA — Aflatoxins in food: https://www.fda.gov/food/chemical-contaminants-food/aflatoxins
Article prepared by the MoldNewsHub editorial team based on peer-reviewed research and publicly available scientific literature.