An ulcer is a deeper breach of epithelium compared to an erosion or excoriation, and involves damage to both epithelium and lamina propria.An erosion is a superficial breach of the epithelium, with little damage to the underlying lamina propria. A mucosal erosion is an erosion which specifically occurs on a mucous membrane. Only the superficial epithelial cells of the epidermis or of the mucosa are lost, and the lesion can reach the depth of the basement membrane. Erosions heal without scar formation.Excoriation is a term sometimes used to describe a breach of the epithelium which is deeper than an erosion but shallower than an ulcer. This type of lesion is tangential to the rete pegs and shows punctiform (small pinhead spots) bleeding, caused by exposed capillary loops. Causes
Ulcers and erosions can be the result of a spectrum of conditions including:

Those causing auto-immune epithelial damage, damage because of an immune defect (e.g., HIV, leukemia)
Infections (e.g. herpes viruses)
Nutritional disorders (e.g., vitamin deficiencies). Chemicals such as SLS (a common ingredient in many toothpastes) have been linked to mouth ulcers, and have been recognized by public health agencies such as the NHS as a risk factor. Injuries (e.g. biting of the lip, tongue, and cheek, hard foods can scrape the oral tissues, hot foods can cause burns)
Stress: When the body is stressed, the immune symptom may trigger mouth sores

Pathophysiology
The exact pathogenesis is dependent upon the cause.
Signs of a gastrovascular infection include abdominal pain, nausea, bloating, vomiting, diarrhea, and weight loss. Many individuals with CVID have an impaired ability to absorb nutrients, including vitamins, proteins, minerals, fats, and sugar within the digestive tract.Due to changes in development in B cells, some individuals with CVID have accumulations of lymphocytes in lymphoid tissues. This can cause mild to severely swollen lymph nodes or inflammation of the spleen. In addition, a certain percentage of individuals with CVID are more susceptible to developing certain forms of cancer, more so than those without the condition. The two most common cancers in common variable immunodeficiency patients include lymphoma and certain stomach cancers. The risk for these given cancers is almost fifty times greater in common variable immunodeficiency patients than those without. People with common variable immunodeficiency have trouble fighting off infections due to the lack of antibodies produced which normally resist invading microbes. Due to impaired antibody development vaccines are not effective. Recurring bacterial infections are generally found in the upper and lower areas of the respiratory tract. Many who have a recurring lung infection, report developing, chronic lung diseases, and potentially life-threatening complications later in life. Causes
The cause of CVID is poorly understood. A likely cause are Deletions in genes that encode cell surface proteins and cytokine receptors, such as CD19, CD20, CD21, and CD80. Additionally, the disease is defined by T cell defects, namely reduced proliferative capacity. The condition is hard to diagnose, taking on average 6–7 years after onset. CVID is a primary immunodeficiency.