How Did I Get a Canker Sore? Causes and Triggers

Canker sores form when your immune system attacks the thin lining of your mouth, creating a small, painful ulcer. The exact trigger varies from person to person, but it’s almost always some combination of physical irritation, stress, nutritional gaps, food sensitivities, or genetic predisposition. Understanding what set yours off can help you prevent the next one.

Your Immune System Turned on Your Own Tissue

A canker sore isn’t an infection. It’s a misdirected immune response. Certain white blood cells, particularly a type called cytotoxic T cells, begin destroying the cells lining your mouth. Once that attack starts, your body releases inflammatory signaling molecules that sustain the damage and keep the area inflamed. People who get canker sores regularly show elevated levels of several inflammatory markers in their blood, along with abnormal activity in the immune pathways that normally help distinguish threats from your own tissue.

This is why canker sores look and feel the way they do: a shallow, round ulcer with a white or yellowish center surrounded by a red border. That’s exposed, inflamed tissue. Most are small and heal on their own within one to two weeks without scarring. Larger, deeper ones can take up to six weeks and may leave scars.

Genetics Play a Bigger Role Than You’d Think

If your parents get canker sores, you’re far more likely to get them too. When both parents are affected, the chance of their child developing recurrent canker sores is about 90%. When neither parent has them, that drops to around 20%. This strong hereditary component helps explain why some people get canker sores repeatedly while others never get a single one, even with similar diets and stress levels.

Stress Changes Your Mouth Chemistry

Stress is one of the most common triggers, and the connection is measurable. People with recurrent canker sores have significantly higher levels of cortisol (the body’s main stress hormone) in their saliva compared to people without them, both during an active outbreak and even after healing. Stress alters your immune function by shifting the balance of T cells, B cells, and natural killer cells while simultaneously ramping up hormonal markers like cortisol. The result is an immune environment more prone to attacking your own oral tissue.

This helps explain why canker sores tend to appear during exam weeks, work deadlines, or emotionally difficult periods. The sore might show up a day or two after the stressful event, not during it, which can make the connection easy to miss.

Certain Foods Trigger or Worsen Outbreaks

Food triggers fall into two categories: things that provoke your immune system and things that irritate tissue that’s already vulnerable.

Immune-provoking foods vary by person but commonly include cow’s milk and other dairy proteins, gluten (from wheat, barley, and rye), chocolate, and certain food additives like artificial colors and flavor enhancers. In susceptible people, these foods trigger immune reactions in the oral lining that lead directly to ulceration. If you notice a pattern between eating specific foods and getting sores a day or two later, a food sensitivity is a likely culprit.

Acidic foods don’t necessarily cause canker sores, but they can trigger outbreaks in people who are prone to them and make existing sores significantly more painful. Common offenders include:

  • Citrus fruits (oranges, lemons, limes, pineapple)
  • Tomatoes and tomato-based sauces
  • Coffee, especially dark roasts and espresso
  • Carbonated drinks
  • Alcohol, particularly wine

Salty and spicy foods won’t usually start a canker sore, but they can cause intense stinging on open sores and may slow healing by further irritating exposed tissue.

Nutritional Deficiencies Weaken Your Defenses

Low levels of certain vitamins and minerals make your mouth lining more vulnerable. The most well-established deficiencies linked to canker sores are vitamin B12, folate (vitamin B9), and iron. Mouth ulcers on the gums or tongue can be an early sign of B12 deficiency, sometimes appearing before other symptoms like fatigue or tingling in the hands. If you’re getting canker sores frequently and can’t identify an obvious trigger, a simple blood test for these nutrients is worth considering.

Vegetarians, vegans, people with heavy menstrual periods, and anyone with digestive conditions that affect nutrient absorption are at higher risk for these deficiencies.

Physical Damage to Your Mouth

Sometimes the trigger is straightforward mechanical injury. Biting the inside of your cheek, jabbing your gums with a toothbrush, burning your mouth on hot food, or irritation from braces or ill-fitting dental appliances can all break the mucosal barrier and give your immune system a site to overreact. If you notice your canker sores always appear in the same spot, look for a source of repeated friction or trauma in that area.

Sodium lauryl sulfate, a foaming agent in many toothpastes, is another known irritant. Switching to an SLS-free toothpaste reduces outbreak frequency for some people.

Your Mouth’s Bacterial Balance Matters

The community of bacteria living in your mouth plays a protective role, helping resist harmful organisms and supporting your mucosal immune defenses. When that balance shifts, it can weaken the oral lining and accelerate ulcer formation. Research shows that people with recurrent canker sores have a distinctly different bacterial profile than people without them. Healthy mouths tend to have more protective bacteria like Streptococcus species, while canker sore patients show higher levels of bacteria typically associated with the gut, like E. coli.

What disrupts this balance? Antibiotics, mouthwashes containing alcohol, poor oral hygiene, and chronic dry mouth can all shift the bacterial community in ways that leave you more vulnerable.

Underlying Health Conditions

Occasional canker sores are extremely common and usually nothing more than an annoyance. But frequent or severe outbreaks can sometimes point to an underlying condition. Celiac disease is one of the most studied connections. Mouth ulcers are among the top five most common ways celiac disease first shows up, and in some cases they’re the only symptom. Inflammatory bowel diseases like Crohn’s disease, Behcet’s disease (which causes ulcers in multiple body areas), and lupus are also associated with recurrent oral ulcers.

Even acid reflux can contribute. Gastric acid reaching the mouth can damage the oral lining and trigger sore formation.

Hormonal Shifts

Some people notice canker sores appearing at specific points in their menstrual cycle, particularly in the days before a period. Hormonal fluctuations affect immune function and mucosal tissue throughout the body, including the mouth. If your outbreaks follow a monthly pattern, hormonal changes are a likely contributing factor.

When a Sore Needs Attention

Most canker sores resolve within one to two weeks without treatment. The key red flag is any mouth ulcer that doesn’t heal, or at least noticeably improve, within two weeks. A sore that persists beyond that window should be evaluated by a doctor or dentist, as it may need a biopsy to rule out other conditions, including oral cancer. Unusually large sores, sores accompanied by high fever, or outbreaks so frequent they overlap also warrant professional evaluation.