Yes, several types of medication can increase your risk of urinary tract infections. Some do it by making it harder for your bladder to empty completely, others by changing the bacterial balance in your vaginal or urinary tract, and a few by altering what ends up in your urine. The connection isn’t always obvious, which is why many people don’t realize a prescription they’ve been taking for months could be behind recurring infections.
Medications That Prevent Your Bladder From Emptying
The most common way medications lead to UTIs is by causing urinary retention, where your bladder doesn’t fully empty when you go to the bathroom. Urine left sitting in the bladder creates a warm, stagnant environment where bacteria can multiply instead of being flushed out. Drugs with anticholinergic effects are the biggest culprits. They work by blocking signals that tell your bladder muscle to contract, which weakens the squeeze your bladder needs to push urine out completely.
The list of medications with anticholinergic effects is surprisingly long, and many are common, over-the-counter drugs you might not think twice about:
- First-generation allergy medications like diphenhydramine (Benadryl), chlorpheniramine, and doxylamine (the active ingredient in many sleep aids)
- Older antidepressants like amitriptyline, nortriptyline, and imipramine
- Overactive bladder drugs like oxybutynin, solifenacin, and tolterodine, which ironically are prescribed for urinary problems
- Older antipsychotics like chlorpromazine and thioridazine
- Cold and flu medications containing pseudoephedrine or phenylephrine, which tighten the bladder outlet
Opioid painkillers, muscle relaxants like cyclobenzaprine and baclofen, and certain blood pressure medications also make the list. The risk is highest if you already have something partially blocking urine flow, such as an enlarged prostate. But even without a pre-existing condition, long-term use of these drugs can leave enough residual urine in your bladder to set the stage for infection.
Diabetes Medications That Change Your Urine
A class of type 2 diabetes drugs called SGLT2 inhibitors works by forcing excess sugar out of your blood and into your urine. That sugar-rich urine can feed bacteria in the urinary tract. These medications include canagliflozin (Invokeza), dapagliflozin (Farxiga), and empagliflozin (Jardiance).
In 2015, the FDA added label warnings to all SGLT2 inhibitors after identifying 19 cases of life-threatening blood infections and kidney infections that started as UTIs, all requiring hospitalization. That said, when researchers looked at large clinical trials involving thousands of patients, the overall UTI risk was only marginally higher than placebo (a risk ratio of 1.07, meaning a 7% relative increase). The bigger concern with these drugs is genital yeast infections, which occur at nearly four times the rate of placebo. Still, if you’re on an SGLT2 inhibitor and keep getting UTIs, it’s worth discussing with your prescriber.
How Antibiotics Can Backfire
This one catches people off guard: antibiotics, the very drugs used to treat UTIs, can also set you up for one. Broad-spectrum antibiotics don’t just kill the bacteria making you sick. They also wipe out protective Lactobacillus species that normally dominate the vaginal microbiome. These beneficial bacteria produce lactic acid and hydrogen peroxide, keeping vaginal pH low and making the environment hostile to E. coli, the bacterium responsible for most UTIs.
When antibiotics knock out that protective barrier, E. coli and other harmful bacteria can colonize the vaginal area more easily, and from there it’s a short trip to the urethra and bladder. This is one reason why women who take repeated courses of antibiotics for UTIs sometimes find themselves stuck in a frustrating cycle of infection, treatment, and reinfection.
Hormonal Changes From Medications
Estrogen plays a key role in maintaining the health of vaginal and urinary tract tissue. It keeps the vaginal lining thick, well-lubricated, and acidic enough to support protective bacteria. When estrogen levels drop, the vaginal pH rises, Lactobacillus populations decline, and the tissue becomes thinner and drier. All of this makes bacterial growth easier and UTIs more likely.
Several medications can cause this kind of estrogen depletion. Certain hormonal contraceptives suppress estrogen through negative feedback on the hormonal system. Estrogen receptor-modulating drugs used in breast cancer treatment have similar effects on vaginal and urinary tract tissue.
For postmenopausal women already dealing with low estrogen, vaginal estrogen therapy (applied locally as a cream, ring, or tablet) is one of the most effective ways to reduce recurrent UTIs. The American Urological Association specifically recommends it. Notably, systemic hormone replacement therapy taken as a pill does not provide the same protection. Only estrogen applied directly to the vaginal tissue makes a meaningful difference in UTI risk.
Spermicides and Vaginal Products
Spermicides containing nonoxynol-9, commonly found in contraceptive gels, foams, and on some condoms, disrupt the vaginal microbiome in a dose-dependent way. At higher cumulative exposures, nonoxynol-9 more than doubles the odds of bacterial vaginosis (odds ratio 2.3) and significantly increases the presence of harmful anaerobic bacteria while promoting the growth of less protective strains of Lactobacillus. These shifts in vaginal flora create conditions that favor E. coli colonization and, by extension, UTIs. If you use spermicide-coated condoms or spermicidal products and experience frequent UTIs, switching to a non-spermicidal option is a simple change that can help.
Immunosuppressive Drugs
Corticosteroids and other immunosuppressive medications dampen your immune system’s ability to fight off infections, including in the urinary tract. The risk scales with both the dose and the duration of treatment. High-dose corticosteroids used for conditions like multiple sclerosis flares, organ transplant maintenance, or autoimmune diseases leave you more vulnerable to bacterial infections generally, and the urinary tract is no exception. Chemotherapy drugs also suppress immune function, though one in particular, cyclophosphamide, can directly irritate and damage the bladder lining through a toxic byproduct. This chemical irritation (hemorrhagic cystitis) is not technically a UTI since no bacteria are involved, but the damaged tissue can become more susceptible to secondary infections.
Reducing Your Risk While on These Medications
If you suspect a medication is contributing to recurring UTIs, the most useful step is identifying which drug category might be responsible and talking to your prescriber about alternatives. Someone taking a first-generation antihistamine for allergies, for example, could switch to a newer-generation option that doesn’t affect the bladder. A person on an older antidepressant with strong anticholinergic effects might do well on a different class of antidepressant entirely.
Staying well hydrated helps flush bacteria from the bladder more frequently, which is especially important if you’re on a medication that promotes urinary retention or increases sugar in your urine. Making sure you fully empty your bladder each time you urinate (taking a moment to relax and try again before leaving the bathroom) can also reduce stagnant urine. For postmenopausal women on medications that further lower estrogen levels, adding vaginal estrogen therapy can restore some of the natural defenses that keep UTIs at bay.
Not every UTI has a drug-related cause, of course. But if you’re dealing with infections that keep coming back and you take any of the medications described above, the connection is worth exploring. Sometimes the fix is as straightforward as adjusting one prescription.

