Are Ulcers Contagious? Stomach vs. Mouth Ulcers

Ulcers themselves aren’t contagious, but the most common cause of stomach ulcers is a bacterial infection that spreads from person to person. The bacterium, H. pylori, infects roughly 44% of adults worldwide and passes between people through oral and fecal contact. So while you can’t “catch an ulcer” from someone, you can catch the infection that leads to one.

The answer also depends on what type of ulcer you mean. Stomach and intestinal ulcers, mouth ulcers, and cold sores are all commonly called “ulcers,” and they have very different answers when it comes to contagiousness.

How Stomach Ulcers Spread

Peptic ulcers, the open sores that form in the lining of the stomach or upper small intestine, have two main causes. The first is H. pylori infection. The second is long-term use of common pain relievers like ibuprofen (Advil, Motrin), naproxen (Aleve), and aspirin. Ulcers caused by painkillers are not contagious at all. Stress and spicy foods don’t cause ulcers either, though they can worsen symptoms.

H. pylori is where contagion enters the picture. This bacterium lives in the mucous layer that protects the stomach lining. Most people who carry it never develop symptoms, but in some cases it damages that protective layer enough to allow stomach acid to eat into the tissue beneath, creating an ulcer.

The bacterium spreads through three main routes: mouth to mouth, feces to mouth, and stomach contents to mouth (during vomiting). In practical terms, this means contaminated water, contaminated food, and close contact with an infected person, especially during illness. A CDC-funded study in northern California tracked over 2,700 household members and found that living with an infected person who had a stomach illness raised the risk of new infection nearly fivefold. When that sick person was vomiting, the risk jumped even higher, to more than six times the baseline. About 75% of new household infections were traced back to exposure to a sick, infected family member.

Who Is Most at Risk

Children are far more vulnerable than adults. In the same California study, the annual rate of new H. pylori infection was 21% in children under two years old, compared to 7% overall. Globally, about 35% of children and adolescents already carry the bacterium. Infection tends to happen in childhood and then persist for life if untreated.

Crowded living conditions and limited access to clean water increase risk significantly. H. pylori infection clusters within families, and it’s more common in regions with lower sanitation infrastructure. If one family member tests positive, others in the household are more likely to be carrying it too.

Mouth Ulcers: A Different Story

People searching about contagious ulcers are often thinking about sores in or around the mouth, and the answer here depends on which type you have.

Canker sores (aphthous ulcers) are the small, painful white or yellow sores that appear inside the mouth, on the inner cheeks, lips, or tongue. They are not contagious. Their exact cause is unknown, and you cannot pass them to someone else through kissing, sharing utensils, or any other contact.

Cold sores (fever blisters) look different and behave differently. They appear outside the mouth, typically around the border of the lips, as clusters of small fluid-filled blisters. Cold sores are very contagious. They’re caused by the herpes simplex virus (usually type 1) and spread easily through direct contact, especially when blisters are present. The simplest way to tell them apart: canker sores form inside the mouth, cold sores form outside it.

How H. Pylori Is Detected

If you’re concerned about having the infection that causes stomach ulcers, testing is straightforward and noninvasive. The most common options are a breath test and a stool test. For the breath test, you swallow a small amount of a special substance, and if H. pylori is present in your stomach, it breaks down the substance in a way that’s detectable when you exhale. Stool tests look for proteins from the bacterium directly.

Accuracy varies. A large meta-analysis estimated the stool antigen test detects the infection about 83% of the time at a specificity of 90%, meaning it’s good but not perfect. Some individual studies have reported sensitivity above 90%. If results are uncertain, your doctor may recommend a second type of test or an endoscopy for confirmation.

Treatment Success Rates

H. pylori is treated with a combination of antibiotics and acid-reducing medication, typically taken for about two weeks. The goal is to eliminate the bacterium entirely, which allows the ulcer to heal and prevents recurrence. For people being treated for the first time, eradication rates are around 83%, with some regimens performing slightly better than others. In a large U.S. study, the most effective first-line approach cleared the infection in about 84% of patients.

If the first round of treatment fails, success rates for the second attempt drop to roughly 69%. This is one reason completing the full course of treatment matters: stopping early increases the chance of antibiotic resistance and makes future treatment harder.

Reducing the Risk of Spreading It

Because H. pylori spreads through contaminated food, water, and close contact, prevention comes down to basic hygiene practices:

  • Hand washing: Wash hands thoroughly with soap and water before eating and preparing food, and after using the bathroom.
  • Safe food and water: In areas where water quality is uncertain, drink from treated or bottled sources and avoid raw foods washed in untreated water.
  • Testing household members: If one person in a household is diagnosed with H. pylori, testing other family members reduces the chance of reinfection after treatment. This is especially important if young children are in the home.
  • Extra caution during illness: Because vomiting by an infected person is a major transmission route, careful cleanup and hand hygiene during stomach illnesses makes a meaningful difference.

The bacterium’s global prevalence has dropped from about 53% before 1990 to 44% in recent years, likely reflecting improvements in sanitation and living conditions. But it remains one of the most common chronic infections in the world, and within households, it still spreads readily when people aren’t aware a family member carries it.