Stomach ulcers are caused by damage to the protective lining of the stomach, and two culprits account for the vast majority of cases: a bacterial infection called H. pylori and the regular use of common pain relievers like ibuprofen and aspirin. Over 90% of duodenal ulcers (the most common type) are linked to H. pylori infection. Beyond these two primary drivers, smoking, alcohol, severe physical stress, and rare tumor conditions can also cause or worsen ulcers.
H. pylori: The Most Common Cause
Helicobacter pylori is a spiral-shaped bacterium that colonizes the stomach lining, sometimes for decades without causing symptoms. About half the world’s population carries it. When it does cause problems, the damage is surprisingly direct: the bacterium produces enzymes that break down the thick layer of mucus protecting your stomach wall. It also degrades the fatty barrier on the surface of stomach cells. Once that shield is compromised, your own stomach acid seeps through and begins eating into the exposed tissue, forming an ulcer.
Most people pick up H. pylori in childhood, typically through contaminated food, water, or close contact with an infected person. In high-income countries, infection rates have dropped significantly over the past few decades thanks to improved sanitation. That shift has changed the landscape of ulcer disease: in wealthier nations, pain relievers and aspirin have overtaken H. pylori as the leading cause of peptic ulcers, while in lower-income regions the bacterium remains the dominant factor.
Pain Relievers and Anti-Inflammatory Drugs
Nonsteroidal anti-inflammatory drugs, commonly called NSAIDs, are the second leading cause of stomach ulcers. This group includes over-the-counter staples like ibuprofen, naproxen, and aspirin, as well as prescription-strength versions. These drugs work by blocking an enzyme your body uses to produce compounds called prostaglandins, which trigger pain and inflammation. The problem is that the same enzyme also produces prostaglandins in your stomach that maintain blood flow to the lining, stimulate mucus production, and help neutralize acid. When you suppress that protective chemistry, your stomach becomes vulnerable.
The risk is dose-dependent. In one endoscopic study, researchers gave healthy adults increasing doses of an NSAID for seven days. At the standard dose, ulcers were uncommon. But at the highest dose, 40% of participants developed a gastric ulcer within a week. More specifically, every ulcer in the study occurred in subjects whose dose exceeded a certain threshold relative to their body weight, while no ulcers appeared below that level. This means heavier, less frequent use carries substantially more risk than occasional, lower-dose use.
Long-term, daily NSAID use is where the real danger lies. People who take low-dose aspirin for heart protection or ibuprofen for chronic joint pain are at elevated risk, particularly if they’re older, have a history of ulcers, or take blood thinners at the same time.
Smoking and Alcohol
Smoking is not just a background risk factor. Epidemiological data show it independently increases both the incidence and relapse rate of peptic ulcers, and it delays healing of existing ones. Retrospective studies suggest smoking is a true cause of ulcer disease rather than simply a behavior that happens to coincide with it. The mechanisms involve weakening the stomach’s natural defenses: reduced blood flow to the lining, decreased mucus production, and impaired tissue repair.
Alcohol damages the stomach lining through a different route, irritating and inflaming the mucosal surface directly. On its own, moderate drinking may not reliably cause ulcers in a healthy stomach. But when combined with smoking, the risk climbs significantly. The two habits together create a compounding effect on the stomach’s ability to protect and repair itself.
Severe Physical Stress
People who are critically ill can develop ulcers even without H. pylori or NSAID use. These stress ulcers form when the body diverts blood away from the digestive tract during a medical crisis. Severe burns, major head injuries, sepsis, and organ failure all reduce blood flow to the stomach lining, starving it of oxygen and nutrients. Without adequate blood supply, the protective mucus barrier breaks down and acid erodes the tissue.
Head injuries are a special case. Acute brain trauma can trigger a surge of stomach acid production through increased release of the hormone gastrin, leading to particularly aggressive ulceration. Patients on mechanical ventilation for more than three days face elevated risk as well, because the pressure from the ventilator further reduces blood flow to the stomach. These ulcers tend to be shallow but widespread, and they can bleed heavily.
Rare Causes: Gastrin-Producing Tumors
A small number of ulcers are caused by Zollinger-Ellison syndrome, a condition in which tumors called gastrinomas form in the pancreas or the first part of the small intestine. These tumors pump out large amounts of gastrin, the hormone that tells your stomach to produce acid. Normally, your body releases a small pulse of gastrin after a meal. Gastrinomas release it continuously and in excess, flooding the stomach with far more acid than the lining can handle. The result is severe, often multiple ulcers that resist standard treatment and frequently recur.
Zollinger-Ellison syndrome is rare, but it’s worth considering when ulcers keep coming back despite proper treatment or when they appear in unusual locations in the digestive tract.
How Ulcers Are Diagnosed
If your doctor suspects an ulcer, the most reliable test is an upper endoscopy, where a thin, flexible camera is guided through your mouth into your stomach. This procedure has up to 90% sensitivity and specificity for detecting ulcers and allows the doctor to take tissue samples at the same time. It’s generally recommended for anyone over 50 with new digestive symptoms, or for anyone at any age showing warning signs like unexplained weight loss, difficulty swallowing, or vomiting blood.
Testing for H. pylori can be done through a simple breath test with high accuracy. You swallow a small amount of a specially labeled substance, and if H. pylori is present, the bacterium breaks it down in a way that’s detectable in your breath. This same test is used four to six weeks after treatment to confirm the infection has been cleared.
Treatment and the Challenge of Resistance
For H. pylori-related ulcers, treatment combines acid-reducing medication with antibiotics, typically taken for 10 to 14 days. This approach cures the infection in most people and allows the ulcer to heal. However, antibiotic resistance is a growing problem worldwide. Resistance to one of the most commonly used antibiotics in treatment regimens increases the risk of treatment failure sevenfold. When first-line therapy fails, doctors turn to alternative antibiotic combinations, sometimes adding a bismuth-based compound to the regimen.
Some research suggests that taking specific probiotics alongside antibiotics can boost eradication success rates. Studies have reported cure rates around 82% with probiotics compared to about 72% without them, though this remains a supplementary strategy rather than a standalone treatment.
For NSAID-related ulcers, the most effective step is stopping or reducing the drug that caused the problem. Acid-suppressing medication is prescribed to allow the lining to heal, which typically takes four to eight weeks. If you need to continue taking an NSAID for another condition, your doctor may add a protective medication to reduce stomach acid production long-term.
When Ulcers Become Dangerous
Most ulcers heal without serious complications, but 10 to 20% of cases develop problems like bleeding, perforation (a hole through the stomach wall), or obstruction. Perforation affects roughly 2 to 14% of ulcer patients and is a surgical emergency. Globally, about 4 million people are diagnosed with peptic ulcers each year, and perforated ulcers carry mortality rates that can reach 20 to 30%, though outcomes are better at well-equipped hospitals. One large hospital study reported an overall mortality rate of about 13% for perforated ulcers.
Signs that an ulcer may be bleeding or perforating include vomiting blood or material that looks like coffee grounds, black or tarry stools, sudden severe abdominal pain that doesn’t let up, and feeling faint or lightheaded. These symptoms warrant emergency care.

