The belief that spicy food causes gastric or duodenal ulcers is still surprisingly common. Perhaps the easiest evidence for this is the large number of pages on the Internet devoted to dispelling the idea, like the CDC. Historically, a bland diet has been the recommended treatment for those with ulcers ; and for most of the 1900's, gastric acid was believed to be the chief culprit 1). In recent decades, however, Helicobacter pylori and nonsteroidal anti-inflammatory drugs (NSAIDs) have been implicated as the primary causes of stomach ulcers, at least within the scientific and medical establishments. Does there remain any role for diet as the source of ulcers?
The role of H. pylori in the creation of stomach ulcers as been well studied in recent years. Within the stomach, the bacteria produces urease: converting urea to ammonia and raises the pH. The less acidic environment reduces the viscosity of the gastric mucin, allowing the bacteria to move through it and attach to the stomach wall. Once there, it gains protection from the harsh environment of the stomach and produces cytotoxic factors that lead to the formation of ulcers.
The function of NSAIDs in the cause of ulcers is also well understood. Typical NSAIDs work by inhibiting cyclooxygenase, an enzyme responsible for the production of the hormone prostaglandin. Without prostaglandin, the stomach fails to produce sufficient mucus, and produces excess acid.
Apart from H. pylori and NSAIDs there are ideopathic ulcers—those with no specifically known cause. A review by Iijima et al., noted that various studies recorded rates of ideopathic ulcers ranging from 4–40\%. It may be worthwhile to regard the values with a grain of salt because the same report identified deficiencies in the manner that H. pylori diagnosis was excluded, and it is often difficult to make sure that participants don't secretly take NSAIDs.
While there are no clear causes for ideopathic ulcers, some studies have identified risk factors. Physiological stress is an important factor. Iijima et al. identified age, serious underlying diseases (especially liver cirrhosis), and physiological stress; while Kang et al. did not find a significant difference in age between patients with H. pylori or NSAID caused ulcers versus those with ideopathic ulcers. The Kang et al. study also questioned its participants about salty and spicy food consumption, but did not mention this at all in the results.
Aside from the commonly known and studied causes of ulcers, any specific evidence for a relationship between spicy food and ulcers is murky at best. Myers et al. observed that red and black pepper can cause short-term mucosal microbleeding similar to an adult dose of aspirin but declined to speculate on any detrimental or beneficial effect this may have. Graham et al. performed a similar experiment with jalapeno peppers and reported no observable mucosal damage. Mhaskar et al. and Kang et al. observed that consumption of chili peppers seemed to be protective against H. pylori infection and ulcers but the mechanism is unknown.
Capsaicin is the principle ingredient responsible for hot peppers. Capcasin-sensitive neurons in the stomach are responsible for initiating a protective response. Sobue et al. found that low–moderate dosages of capsaicin protected rat stomachs against ethanol, but also mentioned that excessive and neurotoxic doses of capsaicin can make the stomach more susceptible to harm.
In this light, it seems difficult to implicate spicy food in the production of ulcers. Within a clinical context, there is no clear evidence that links diet with ulcer formation. There may be some bias at work here: since only cases severe enough to warrant a visit to the doctor would be observed. The work of Myers et al. suggests that sufficiently spicy food may be responsible for short-term irritation and possibly ulceration. Even if this is the case, it is not entirely clear that this is actually a bad thing. It seems likely that extremely spicy food—maybe something on the order of “It was so spicy I couldn't taste anything for a week”—may be neurotoxic to capsaicin-sensitive neurons in the stomach, leaving the organ vulnerable to harm. Whether such a high dose is likely in the human diet and whether this could lead to ulcers is unclear.
In surveys outside the laboratory setting, Mhaskar et al. and Kang et al. observed a negative association between consumption of spicy food and ulcer formation. While this gives no insight to the actual mechanism at work, it does support the idea that spicy food in a normal the human diet is not ulcergenic.
Finally, ulcers that people blame spicy food for may not be ulcers at all. Non-ulcerative indigestion (dyspepsia) is a differential diagnosis for peptic ulcer disease. Without laboratory tests it is difficult to reliably confirm the existence of an ulcer. Saneei et al. found significantly higher rates of chronic indigestion among those who regularly ate spicy food. It seems quite possible that beliefs about ulcers actually originated from other forms of indigestion.
Spicy food seems unlikely to cause ulcers; or at least, it's just as likely to prevent them. H. pylori infections and NSAIDs are the predominant causes of ulcers. Spicy foods may play some harmful or beneficial role in how the stomach protects itself from harm, but it is certainly not a common cause. The Hippocratic method of consumption in moderation—however dated—is probably the best here.