Our Services
Medical Information
Helpful Resources
Published on: 12/1/2026
Yes, persistent diarrhea lasting more than four weeks can signal an immune-related problem, including autoimmune conditions like celiac disease, Crohn's disease, and ulcerative colitis, as well as immunodeficiencies such as common variable immunodeficiency (CVID), selective IgA deficiency, or HIV, where the gut loses its ability to defend against infection and inflammation. Warning signs that point toward an immune cause include unintentional weight loss, blood or mucus in stool, recurrent sinus or lung infections, joint pain, skin rashes, and a family history of autoimmune disease. Not every case is immune-driven, since infections, medications, lactose intolerance, bile acid malabsorption, and irritable bowel syndrome cause similar symptoms and require very different treatment. There are several important factors to consider, including which tests help separate these causes and when to seek urgent care, so review the complete details below before drawing conclusions.
Because overlapping causes make self-diagnosis unreliable, and because some immune conditions quietly damage the intestine over years, it is worth taking a few minutes to complete a free, instant, online symptom check that organizes your specific symptoms, flags patterns a clinician should evaluate, and helps you walk into your next appointment with clearer questions and faster direction.
Last reviewed for medical accuracy: 11/30/2026
Yes. Ongoing diarrhea can sometimes be linked to an immune problem, especially when it occurs alongside repeated or unusual infections. However, diarrhea lasting weeks or months has many possible causes, and an immune deficiency is only one of them.
Diarrhea is generally considered chronic when it lasts for four weeks or longer. Common causes include irritable bowel syndrome, food intolerances, medication side effects, inflammatory bowel disease, celiac disease, persistent infections, and problems absorbing nutrients. A doctor can help identify the cause rather than assuming it is related to immunity.
The immune system protects the body from bacteria, viruses, parasites, and fungi. A large part of the immune system is found in and around the digestive tract. It helps control organisms that enter through food and water while allowing healthy gut bacteria to live there.
If parts of the immune system do not work properly, a person may be more likely to develop infections in the intestines or have trouble clearing them. This may lead to:
An immune problem may also affect the gut indirectly. For example, some immune conditions increase the risk of inflammatory bowel disease or other inflammation in the digestive tract.
The combination of chronic diarrhea and frequent infections is more suggestive of an immune problem than diarrhea alone, particularly if infections are severe, recurrent, difficult to treat, or occur in several parts of the body.
Possible warning patterns include:
One example is common variable immunodeficiency, often called CVID. People with CVID have low levels of certain antibodies and may develop repeated respiratory infections, intestinal infections, or chronic diarrhea. Another condition, selective IgA deficiency, can increase susceptibility to infections affecting the airways and digestive tract, although many people with it have few or no symptoms.
Certain immune problems can also make infections such as Giardia more persistent. This parasite can cause prolonged diarrhea, gas, abdominal discomfort, and weight loss. It may be acquired through contaminated water, food, or contact with an infected person.
HIV can weaken the immune system and may cause persistent diarrhea, particularly when untreated. This does not mean that chronic diarrhea indicates HIV, but testing may be appropriate when there has been a possible exposure or other related symptoms.
Most people with ongoing diarrhea do not have a primary immune deficiency. Several more common conditions can produce similar symptoms.
These include:
A person can also have more than one cause. For example, antibiotics may alter gut bacteria and cause diarrhea, while an underlying condition such as celiac disease makes symptoms more likely to continue.
You should speak to a doctor if diarrhea lasts longer than a few days and is not improving, or if it repeatedly returns. Make an appointment sooner if you also have frequent infections, unexplained weight loss, anemia, persistent fatigue, or a family history of immune problems or bowel disease.
Seek urgent medical care for:
These symptoms do not necessarily mean a life-threatening illness, but they should not be ignored. Speak to a doctor promptly about anything that could be serious or life threatening.
A clinician will usually ask about the duration and pattern of the diarrhea, recent travel, food and water exposure, medications, diet, family history, and infections. They may also ask whether stools are watery, greasy, bloody, or unusually foul-smelling.
Possible tests include:
If you are being tested for celiac disease, do not stop eating gluten before speaking with your doctor. Avoiding gluten too early can make test results less reliable.
Drink regular amounts of fluid. Oral rehydration solutions can help replace water and salts, particularly if diarrhea is frequent. Eat simple, nourishing foods that you tolerate, and keep a record of meals, bowel movements, medications, infections, and other symptoms.
Avoid using anti-diarrhea medicines without medical advice if you have fever, bloody stool, severe abdominal pain, or suspected infection. Do not start antibiotics without a prescription; they may worsen some types of diarrhea and can cause additional complications.
If you are unsure how urgent your symptoms may be, you might consider a free, online symptom check, using the doctor approved Ubie Symptom Checker. It cannot diagnose an immune disorder or replace medical care, but it may help you organize your symptoms and decide what to discuss with a clinician.
In short, ongoing diarrhea can be connected to an immune problem, especially when paired with repeated or unusual infections. Still, many other treatable conditions are more common. Persistent symptoms deserve a proper medical assessment rather than guesswork.
(References)
* Gryboski JD. Chronic diarrhea. Curr Probl Pediatr. 1979 Mar;9(5):1-52. doi: 10.1016/s0045-9380(79)80017-1. PMID: 436445; PMCID: PMC7131527.
* Bartlett JG, Belitsos PC, Sears CL. AIDS enteropathy. Clin Infect Dis. 1992 Oct;15(4):726-35. doi: 10.1093/clind/15.4.726. PMID: 1420693.
* Ament ME, Barclay GN. Chronic diarrhea. Pediatr Ann. 1982 Jan;11(1):124-31. doi: 10.3928/0090-4481-19820101-08. PMID: 7063259.
* Buda P, Friedman-Gruszczyńska J, Książyk J. [Congenital diarrhoea]. Med Wieku Rozwoj. 2011 Oct-Dec;15(4):477-86. PMID: 22516705.
* Leven EA, Maffucci P, Ochs HD, Scholl PR, Buckley RH, Fuleihan RL, Geha RS, Cunningham CK, Bonilla FA, Conley ME, Ferdman RM, Hernandez-Trujillo V, Puck JM, Sullivan K, Secord EA, Ramesh M, Cunningham-Rundles C. Hyper IgM Syndrome: a Report from the USIDNET Registry. J Clin Immunol. 2016 Jul;36(5):490-501. doi: 10.1007/s10875-016-0291-4. Epub 2016 May 17. PMID: 27189378; PMCID: PMC5039943.
* Neves-Maia J, Gomes C, Marinho A, Alves R. Campylobacter jejuni Pericarditis: A Case Report. Acta Med Port. 2022 Dec 2;35(12):912-914. doi: 10.20344/amp.17251. Epub 2022 Apr 28. PMID: 35482351.
* Galati A, Muciaccia R, Marucci A, Di Paola R, Menzaghi C, Ortolani F, Rutigliano A, Rotondo A, Fischetto R, Piccinno E, Delvecchio M. Early-Onset Diabetes in an Infant with a Novel Frameshift Mutation in LRBA. Int J Environ Res Public Health. 2022 Sep 3;19(17). doi: 10.3390/ijerph191711031. Epub 2022 Sep 3. PMID: 36078750; PMCID: PMC9517908.
* Fujikawa H, Shimizu H, Nambu R, Takeuchi I, Matsui T, Sakamoto K, Gocho Y, Miyamoto T, Yasumi T, Yoshioka T, Arai K. Monogenic inflammatory bowel disease with STXBP2 mutations is not resolved by hematopoietic stem cell transplantation but can be alleviated via immunosuppressive drug therapy. Clin Immunol. 2023 Jan;246:109203. doi: 10.1016/j.clim.2022.109203. Epub 2022 Dec 9. PMID: 36503158.
* Lee WQ, Leong KF. Infantile vitiligo and alopecia in immunodysregulation polyendocrinopathy enteropathy X-linked syndrome. Pediatr Dermatol. 2023 Sep-Oct;40(5):886-889. doi: 10.1111/pde.15266. Epub 2023 Feb 2. PMID: 36727435.
* Kang H, Hubbi ME. A Rare Cause of Chronic Diarrhea and Peripheral Neuropathy. Gastroenterology. 2024 Jan;166(1):e17-e19. doi: 10.1053/j.gastro.2023.09.013. Epub 2023 Sep 14. PMID: 37714363.
We would love to help them too.
For First Time Users
We provide a database of explanations from real doctors on a range of medical topics. Get started by exploring our library of questions and topics you want to learn more about.
Was this page helpful?
Purpose and positioning of servicesUbie Doctor's Note is a service for informational purposes. The provision of information by physicians, medical professionals, etc. is not a medical treatment. If medical treatment is required, please consult your doctor or medical institution. We strive to provide reliable and accurate information, but we do not guarantee the completeness of the content. If you find any errors in the information, please contact us.