What Is Immune Deficiency? Causes, Types & Treatment

Immune deficiency is a state in which part of the immune system is missing, underdeveloped, or not working properly, leaving a person unusually vulnerable to infections that healthy immune systems handle without trouble. It can be something you are born with, rooted in a genetic mutation that disrupts how your body makes or deploys immune cells, or it can develop later in life from diseases, medications, malnutrition, or aging. The distinction between these two broad categories, often called primary and secondary immunodeficiency, shapes almost everything about how the condition is identified, managed, and treated.

Primary Versus Secondary Immunodeficiency

Primary immunodeficiency diseases (PIDs) are inherited. They result from genetic mutations that affect how specific immune cells develop or function. More than 400 distinct genetic disorders have been cataloged so far, and they range from mild antibody shortfalls that go unnoticed for years to life-threatening conditions apparent in the first weeks of life. In a large genetic study of PID patients, defects affecting both cellular and humoral immunity made up the largest share of diagnoses, followed by combined immunodeficiencies with syndromic features and defects in innate immunity.1Scientific Reports. Genetic and epidemiological patterns of primary immunodeficiency diseases in Eastern Iranian patients

Secondary immunodeficiencies, by contrast, are acquired. They arise when something external damages or suppresses an otherwise normal immune system. The list of culprits is long: HIV infection, chemotherapy and other immunosuppressive drugs, organ transplant medications, chronic diseases like kidney failure and diabetes, surgical trauma, and extreme environmental stress. Globally, the single most common cause of secondary immunodeficiency is malnutrition.2PubMed Central. Secondary immunodeficiencies, including HIV infection Secondary forms vastly outnumber primary ones in the overall population, but primary immunodeficiencies are far more common than most people assume, and many go undiagnosed for years.

Antibody Deficiencies

The most frequently diagnosed group of primary immunodeficiencies involves problems with antibody production. Antibodies are proteins your B cells manufacture to tag and neutralize bacteria, viruses, and toxins. When B cells are absent, too few in number, or unable to produce adequate antibodies, infections pile up, especially bacterial ones targeting the lungs, sinuses, and ears.

Common variable immunodeficiency (CVID) is the most widespread symptomatic antibody deficiency in adults. It typically shows up in the teens or twenties and is characterized by low levels of multiple antibody classes. Unlike many primary immunodeficiencies, CVID usually does not follow a clear single-gene inheritance pattern, which made it a puzzle for researchers for decades.3PubMed Central. Common variable immune deficiency: Dissection of the variable Patients with CVID face recurrent lung infections, but the condition also drives non-infectious complications: enlarged lymph nodes, liver, and spleen, along with autoimmune problems that can be harder to manage than the infections themselves.4PubMed. Comparison of clinical and immunological features and mortality in common variable immunodeficiency and agammaglobulinemia patients

Agammaglobulinemia, a related but distinct condition, tends to appear much earlier in childhood. The most common form is caused by mutations in the BTK gene, which B cells need to mature. Without functional BTK protein, B cells essentially never develop, leaving the child with almost no circulating antibodies. Symptoms in agammaglobulinemia start earlier than in CVID, but the disease course in CVID patients tends to be longer and more complex.4PubMed. Comparison of clinical and immunological features and mortality in common variable immunodeficiency and agammaglobulinemia patients

Severe Combined Immunodeficiency

Severe combined immunodeficiency (SCID) sits at the extreme end of the spectrum. Infants born with SCID lack functioning T cells and often lack B cells and natural killer cells as well, which means both branches of adaptive immunity are crippled. Without treatment, these babies are vulnerable to serious, often fatal infections within the first year or two of life.5International Journal of Neonatal Screening. Newborn Screening for Severe Combined Immunodeficiency-A History of the TREC Assay

The good news is that SCID can now be caught at birth in many countries through newborn screening. A blood spot test measures T-cell recombination excision circles (TRECs), tiny DNA fragments produced when T cells develop normally. A very low TREC count flags a baby whose T cells are not developing. In validation studies, this screening method caught every case of typical SCID tested.6PubMed Central. TREC Based Newborn Screening for Severe Combined Immunodeficiency Disease: A Systematic Review Early detection matters enormously because outcomes after treatment, usually a stem cell transplant, are dramatically better when the procedure happens before infections set in.

Phagocyte and Complement Disorders

Not all immune deficiencies center on antibodies or T cells. Your innate immune system, the set of defenses you are born with rather than the ones you develop over time, has its own points of failure.

Phagocytes are white blood cells that physically engulf and kill invading microbes. Chronic granulomatous disease (CGD) is the best-known phagocyte disorder. People with CGD have phagocytes that can swallow bacteria and fungi but cannot generate the chemical burst needed to destroy them. The underlying problem is a defective enzyme complex called NADPH oxidase, which normally produces reactive oxygen species to kill pathogens inside the cell.7PubMed Central. Recent advances in chronic granulomatous disease The result is recurrent bacterial and fungal infections, often in the lungs, liver, and lymph nodes, along with persistent inflammatory masses called granulomas.8PubMed Central. Chronic granulomatous disease: a review of the infectious and inflammatory complications

Complement deficiencies affect a different arm of innate immunity. The complement system is a cascade of proteins in the blood that helps mark pathogens for destruction, punch holes in bacterial membranes, and clear immune complexes from circulation. Mutations that knock out specific complement proteins can increase susceptibility to certain bacterial infections, particularly meningococcal disease, and in some cases contribute to autoimmune conditions.9PubMed. Defects of the Innate Immune System and Related Immune Deficiencies

HIV and Viral-Driven Immune Deficiency

The most widely known secondary immunodeficiency is caused by HIV. The virus specifically targets CD4+ T cells, the coordinators of the adaptive immune response. Over years, HIV progressively depletes these cells. Once the CD4+ T-cell count drops below a critical threshold, the person becomes susceptible to opportunistic infections that a healthy immune system would easily contain. This advanced stage is what we call AIDS.

The process is not just about the virus directly killing T cells. Chronic immune activation, where the immune system stays in overdrive trying to fight the virus, also drives T-cell exhaustion and death. Eventually, the body’s ability to maintain its pool of memory T cells fails, and effector populations fall below the level needed to prevent opportunistic infections.10PubMed Central. CD4(+) T-cell depletion in HIV infection: mechanisms of immunological failure Modern antiretroviral therapy can halt this progression and allow immune recovery, but it does not eliminate the virus. Without sustained treatment, CD4+ depletion resumes.

Medications That Suppress Immunity

Some of the most common secondary immunodeficiencies in wealthy countries are deliberately induced by doctors. Organ transplant recipients take immunosuppressants to prevent rejection. People with autoimmune diseases take drugs that dial down overactive immune responses. Cancer patients receive chemotherapy that kills rapidly dividing cells, immune cells included.

Rituximab, a drug widely used to treat B-cell cancers and certain autoimmune conditions, illustrates how targeted therapies can create specific immune gaps. It works by depleting B cells, which means antibody production drops. In patients receiving intensive chemotherapy followed by rituximab, prolonged periods of low antibody levels can develop, leaving them vulnerable to infections even after the cancer is in remission.11PubMed Central. Immunreconstitution and infectious complications after rituximab treatment in children and adolescents: what do we know and what can we learn from adults? Glucocorticoids, the workhorse anti-inflammatory drugs prescribed for everything from asthma to lupus, also dampen immune function at higher doses and over longer courses. Doctors weigh these risks constantly, adjusting doses to balance disease control against infection risk.

Malnutrition and Chronic Disease

The immune system is metabolically expensive to run. It requires a steady supply of protein, calories, vitamins, and minerals. When those inputs are insufficient, the immune system is one of the first systems to suffer. Chronic malnutrition causes the thymus and spleen to shrink, depleting the organs where T cells develop and where immune responses are coordinated.12eLife. Chronic malnutrition results in uncoupled lymphoid recovery and immune deficiency following refeeding Both protein-calorie malnutrition and zinc deficiency can trigger stress hormones that accelerate thymic atrophy and disrupt blood cell production.13PubMed. Mechanisms of nutrient modulation of the immune response What makes this especially concerning is that restoring normal nutrition does not instantly restore immune function; recovery can lag behind nutritional improvement for weeks or longer.

Chronic kidney disease offers another window into how ongoing illness erodes immunity. As kidney function declines, waste products build up in the blood, including compounds produced by gut bacteria. These substances chronically activate parts of the innate immune system while simultaneously impairing the ability of phagocytes to actually kill bacteria. At the same time, adaptive immunity weakens, raising the risk of viral infections and certain cancers.14PubMed Central. Chronic Kidney Disease-Associated Immune Dysfunctions: Impact of Protein-Bound Uremic Retention Solutes on Immune Cells Diabetes, particularly when it progresses to kidney involvement, compounds the problem further, with evidence that immune dysfunction is deeply intertwined with diabetic kidney pathology.15PubMed Central. Pathological mechanism of immune disorders in diabetic kidney disease and intervention strategies

How Immune Deficiency Is Diagnosed

Suspicion usually begins with a pattern of infections: too many, too severe, too unusual, or too hard to clear. A child who has had multiple bouts of pneumonia, an adult who develops a rare fungal infection, or anyone who needs repeated courses of antibiotics for routine infections may warrant an immunology workup.

Initial testing is relatively straightforward. Doctors look at white blood cell counts and differentials, measure antibody levels in the blood, check how well the patient responds to vaccines, and count specific populations of immune cells like T cells and B cells.16PubMed Central. Diagnostic tests for primary immunodeficiency disorders: Classic and genetic testing Flow cytometry, a lab technique that can identify and count individual cell types based on surface markers, has become especially valuable for pinpointing which part of the immune system is affected. It can help diagnose conditions ranging from SCID and agammaglobulinemia to CGD and rarer syndromes.17PubMed. Flow cytometry-based diagnosis of primary immunodeficiency diseases

When a primary immunodeficiency is suspected, genetic testing can identify the specific mutation responsible. A meta-analysis covering nearly 6,000 patients found that next-generation sequencing identified a causative genetic variant in about 42% of suspected PID cases overall, with the detection rate climbing to 58% in patients with a family history of immune problems.18PubMed Central. Diagnostic yield of next-generation sequencing in suspect primary immunodeficiencies diseases: a systematic review and meta-analysis Getting a precise genetic diagnosis matters beyond academic curiosity: it shapes treatment decisions, especially when stem cell transplantation is on the table.

Immunoglobulin Replacement Therapy

For people whose primary problem is inadequate antibody production, the mainstay treatment is immunoglobulin replacement. This means receiving concentrated antibodies collected from thousands of healthy blood donors, delivered either intravenously (IVIG) in a clinic every few weeks or subcutaneously (SCIG) at home, usually weekly. Both routes are comparably effective and safe.19PubMed. The comparison of the efficacy and safety of intravenous versus subcutaneous immunoglobulin replacement therapy

Many patients prefer subcutaneous infusions because they can do them at home with a small pump and thin needles, avoiding clinic visits. In a study of 60 patients switching from hospital-based IV infusions to home-based subcutaneous ones, antibody levels stayed the same or improved, and serious infections were rare. Local skin reactions at the injection site were the most common side effect and tended to fade after the first couple of months.20PubMed. Rapid subcutaneous IgG replacement therapy is effective and safe in children and adults with primary immunodeficiencies–a prospective, multi-national study Even very young children tolerate subcutaneous infusions well, with studies in infants under five showing effective infection prevention and no serious adverse events.21PubMed Central. Subcutaneous Immunoglobulin Replacement Therapy with Hizentra® is Safe and Effective in Children Less Than 5 Years of Age

Immunoglobulin replacement does not cure anything. It is a lifelong commitment for most patients with primary antibody deficiencies, replacing what the body cannot make on its own. But it has transformed outcomes. Before widespread availability of these products, severe respiratory infections frequently shortened life spans in CVID and agammaglobulinemia patients. Now, with reliable replacement therapy, survival is dramatically improved.3PubMed Central. Common variable immune deficiency: Dissection of the variable

Stem Cell Transplantation

For severe primary immunodeficiencies, particularly SCID, stem cell transplantation is the established curative option. The idea is to replace a defective immune system with a healthy one by infusing blood-forming stem cells from a donor. When a matched sibling donor is available, outcomes are excellent. But even with alternative donors, the procedure can be highly successful if performed early enough.

Data from a large analysis of SCID transplants showed that infants who received their transplant at three and a half months of age or younger survived at a rate of 94%, regardless of donor type. Among older infants without active infections, survival was still about 90%.22PubMed Central. Transplantation outcomes for severe combined immunodeficiency, 2000-2009 This is why newborn screening for SCID has been such a game-changer: catching the disease before infections take hold gives the child the best possible chance.

Having a confirmed genetic diagnosis before transplant also makes a difference. In one study, patients with a known genetic cause had better five-year overall survival (93%) compared to those whose genetic cause was unknown (60%). Graft failure was also less common when the underlying mutation was identified.23PubMed Central. Impact of Genetic Diagnosis on the Outcome of Hematopoietic Stem Cell Transplant in Primary Immunodeficiency Disorders A precise genetic diagnosis likely helps doctors choose the right conditioning regimen, the right donor, and the right timing.

Gene Therapy

Gene therapy aims to fix the root problem by inserting a working copy of the defective gene into a patient’s own stem cells. The corrected cells are infused back, and if all goes well, they repopulate the immune system with functional cells. For certain forms of SCID, gene therapy has moved from experimental promise to clinical reality.

In a trial of eight infants with X-linked SCID (the most common form), lentiviral gene therapy combined with low-dose chemotherapy conditioning led to T-cell, B-cell, and natural killer cell recovery in seven of eight patients within three to four months. Previous infections cleared, and several patients were eventually able to stop receiving immunoglobulin infusions and responded normally to childhood vaccines.24PubMed Central. Lentiviral Gene Therapy Combined with Low-Dose Busulfan in Infants with SCID-X1 More recently, gene therapy has been successfully applied to Artemis-deficient SCID, a rarer form where the DNA-repair machinery needed for immune cell development is broken. In that trial, five of six patients followed for at least two years achieved T-cell reconstitution, and four were able to discontinue antibody replacement.25PubMed Central. Lentiviral Gene Therapy for Artemis-Deficient SCID

Earlier gene therapy attempts using first-generation viral vectors caused leukemia in a small number of treated patients, which set the field back considerably. The newer lentiviral vectors are designed with safety features that reduce this risk, and so far, insertion-site analyses in treated patients have shown no evidence of the dangerous clonal expansion seen in earlier trials.26PubMed Central. Gene Therapy for X-Linked Severe Combined Immunodeficiency: Where Do We Stand? Gene therapy is not yet available for most forms of immune deficiency, but the success in SCID has opened the door for trials in other conditions.

Vaccines and Daily Life With Immune Deficiency

One of the most practically important issues for anyone with immune deficiency is vaccination. Vaccines that contain live, weakened organisms, such as the MMR or varicella vaccines, can be dangerous for people whose immune systems cannot control even an attenuated pathogen. In some cases, these live vaccines are flatly contraindicated.27PubMed Central. Travel advice for the immunocompromised traveler: prophylaxis, vaccination, and other preventive measures Non-live vaccines (like flu shots or COVID boosters) are generally safe, though they may not produce a strong protective response in someone who cannot make adequate antibodies. This is another reason immunoglobulin replacement is so important: the pooled antibodies provide a form of passive protection that the patient’s own immune system cannot generate.

Beyond vaccines, everyday precautions vary with the severity of the deficiency. Someone with mild IgA deficiency, often discovered incidentally and rarely causing problems, may need no lifestyle changes at all. Someone with SCID awaiting transplant may need a near-sterile environment. For the large group in between, practical measures tend to include vigilant hand hygiene, prompt treatment of infections rather than watchful waiting, awareness of food-safety practices, and careful planning around travel, especially to regions with endemic infections the person would struggle to fight off.

Aging and the Immune System

Even without an underlying genetic condition or chronic disease, everyone experiences a gradual decline in immune function with age. The thymus, the organ where T cells mature, begins shrinking after puberty and is largely replaced by fat tissue by middle age. The ratio of naïve T cells (which can respond to new threats) to memory T cells (which remember old ones) tilts steadily toward memory, leaving older adults less equipped to handle novel infections. This aging-related immune decline, sometimes called immunosenescence, contributes to higher infection rates, weaker vaccine responses, and increased cancer risk in older adults.28PubMed Central. Immunosenescence: molecular mechanisms and diseases

Immunosenescence is not technically classified the same way as a primary or secondary immunodeficiency, but functionally, the result overlaps. An 80-year-old who develops shingles, responds poorly to a flu vaccine, or has trouble clearing a urinary tract infection is experiencing the practical consequences of immune decline. This is one reason booster vaccines and high-dose flu vaccines are specifically recommended for older populations: the standard dose may not generate enough of a response in an aging immune system.

The Gut Microbiome Connection

An area that has drawn increasing research attention is the relationship between immune deficiency and the gut microbiome. The trillions of bacteria living in the intestines are not passive residents; they actively shape immune development and help maintain the barrier between the gut’s contents and the bloodstream. In people with primary immunodeficiencies, the normal mechanisms that keep gut bacteria in check are disrupted, leading to abnormal bacterial communities, increased intestinal permeability, and bacterial translocation into the bloodstream. A substantial proportion of PID patients develop inflammatory bowel disease-like symptoms that can be just as debilitating as the infections themselves.29PubMed. The microbiome and immunodeficiencies: Lessons from rare diseases Whether the altered microbiome is a consequence of immune dysfunction or an additional driver of it remains an open question, and likely it is both, creating a feedback loop that complicates treatment.

The Burden Before Diagnosis

One of the most underappreciated aspects of immune deficiency is the toll it takes before anyone figures out what is going on. Primary immunodeficiencies in particular are notorious for delayed diagnosis. Patients bounce between specialists for years, accumulating infections, hospitalizations, and missed school or work days. A study of PID patients in Mexico quantified this burden: prior to diagnosis, patients were hospitalized a median of nearly 19 days per year and missed more than 50 days of school or work annually. The estimated hospitalization cost alone was roughly $4,900 per patient per year, not counting medications or outpatient care.30PLoS ONE. Disease burden for patients with primary immunodeficiency diseases identified at reference hospitals in Guanajuato, Mexico

These numbers understate the full impact because they do not capture the psychological weight of living with unexplained recurrent illness, the anxiety of parents watching a child cycle through infections, or the career disruption and social isolation that often accompany years of poor health. Getting to a diagnosis is itself a form of treatment: it opens the door to targeted therapy, connects families to specialists and support networks, and replaces uncertainty with a concrete plan. When doctors see a patient with a suspicious pattern of infections, especially in childhood, the evidence strongly favors early and thorough immunological workup rather than a wait-and-see approach.