Molds excrete toxic compounds called mycotoxins, secondary metabolites produced by fungi under certain environmental conditions. These environmental conditions affect the production of mycotoxins at the transcription level. Temperature, water activity and pH, strongly influence mycotoxin biosynthesis by increasing the level of transcription within the fungal spore. It has also been found that low levels of fungicides can boost mycotoxin synthesis. Certain mycotoxins can be harmful or lethal to humans and animals when exposure is high enough.
Extreme exposure to very high levels of mycotoxins can lead to neurological problems and, in some cases, death; fortunately, such exposures rarely to never occur in normal exposure scenarios, even in residences with serious mold problems. Prolonged exposure, such as daily workplace exposure, can be particularly harmful.
It is thought that all molds may produce mycotoxins, and thus all molds may be potentially toxic if large enough quantities are ingested, or the human becomes exposed to extreme quantities of mold. Mycotoxins are not produced all the time, but only under specific growing conditions. Mycotoxins are harmful or lethal to humans and animals only when exposure is high enough.
Mycotoxins can be found on the mold spore and mold fragments, and therefore they can also be found on the substrate upon which the mold grows.  Routes of entry for these insults can include ingestion, dermal exposure, and inhalation.
Aflatoxin is an example of a mycotoxin. It is a cancer-causing poison produced by certain fungi in or on foods and feeds, especially in field corn and peanuts.
Toxic effects from mold were thought to be the result of exposure to the mycotoxins of some mold species, such as Stachybotrys chartarum. In 1927, Ismailson, a Soviet scientist, noted a form of mycotoxicosis in employees in a binder twine factory. In the 1940s, "Stachybotryotoxicosis" was identified in Ukraine as a new disease in humans in close contact with moldy hay, including inhalation of the associated dust, which caused, among other symptoms, a "haemorrhagic exúdate". Following cases of pulmonary hemorrhage in infants in Cleveland, Ohio in 1993–94, several related studies suggested a causal relationship between exposure to S. chartarum and the disease. An anonymous panel from within the CDC revisited the cases and argued that the link was not proven. Subsequent studies with mice and rats exposed to S. chartarum and associated mycotoxins showed that pulmonary hemorrhage could occur, suggesting the link is plausible. The American Academy of Pediatrics also found the link plausible, and subsequent analysis and case studies with humans have further noted the association. As well, a 1987 report by the United States Army Medical Research Institute of Infectious Diseases suggested that the effects of "trichothecene mycotoxins are more than 10 times greater via inhalation than via intravenous exposure." The presumed mechanism of action is that Stachybotrys produces a compound, stachylysin, which is a hemolysin that disintegrates (lyses) red blood cells.