Skip to main content
Also available in 2 other languages

Tiếng Việt简体中文

Beginner 5 min read

Infections and Cancer: How Germs Can Raise Risk

An overview of how certain viruses, bacteria, and parasites can lead to cancer, including HPV, hepatitis B and C, H. pylori, EBV, and HIV

This is general education — it cannot tell you what to do in your situation.

Instructions and urgent-contact thresholds vary by treatment and care team. If you are in treatment, follow the instructions your oncology team gave you, and contact them about any new or worsening symptom. If you think you may be having a medical emergency, call your local emergency number.

NCI source:National Cancer Institute

Review status: AI-assisted, source checked. Not reviewed by a clinician. How we check pages

The short answer

Certain infections can raise the risk of cancer. These include the viruses HPV, hepatitis B and C, EBV, and HIV, and the bacterium H. pylori. Vaccines, testing, and treatment can lower the risk from many of these infections.

  • Some viruses, bacteria, and parasites can cause cancer or raise cancer risk.

  • HPV, hepatitis B and C, and H. pylori are among the most common cancer-linked infections.

  • Infections can cause cancer by damaging cells, weakening immunity, or causing long-term inflammation.

  • Vaccines exist for HPV and hepatitis B. They can help prevent related cancers.

Choose how you want to read this

The whole article, with every detail and caution.

The simple version

This page explains which infections are linked to cancer, how they raise risk, and what steps can lower it.

Most cancers are not caused by germs. But some infections can raise the risk of cancer.

Certain viruses, bacteria, and parasites can lead to cancer over time. The most common ones include HPV, hepatitis B and C, and the bacterium H. pylori.

Here is the hopeful part: for many of these infections, there are ways to prevent, test for, or treat them, which lowers cancer risk.

How can an infection lead to cancer?

An infection does not turn into cancer directly. Instead, it can set the stage for cancer in a few ways.

  • Some viruses change how cells grow. They can disrupt the normal signals that keep cells in check, so cells start to grow out of control.
  • Some infections weaken the immune system. This makes the body less able to fight off other infections that can cause cancer.
  • Some infections cause long-term inflammation. Ongoing inflammation can damage cells over many years, which may lead to cancer.

This does not happen to everyone. For example, most HPV infections go away on their own without causing cancer.

HPV (human papillomavirus)

HPV is a very common virus spread through intimate skin-to-skin contact. Most infections clear on their own.

But long-lasting high-risk HPV infection can cause several cancers, including nearly all cervical cancers, as well as some anal, throat, and other cancers.

The HPV vaccine can prevent infection with the types that cause most of these cancers. Cervical cancer screening also helps find and treat cell changes early.

Hepatitis B and C

Hepatitis B (HBV) and hepatitis C (HCV) are viruses that infect the liver. Long-term (chronic) infection can lead to liver cancer.

Hepatitis B spreads when blood, semen, or another body fluid from an infected person enters the body of someone who is not infected. Hepatitis C spreads when blood from an infected person, even in tiny amounts, enters the body.

There is a vaccine for hepatitis B. There is no vaccine for hepatitis C, but the CDC says most people can be cured with pills taken for 8 to 12 weeks. Testing is important because many people with these infections have no symptoms.

H. pylori (a stomach bacterium)

H. pylori is a bacterium that can live in the stomach lining. It is very common around the world.

Long-term infection can cause inflammation that may lead to certain types of stomach cancer. It can also cause stomach ulcers.

H. pylori can be treated with antibiotics. NCI says treatment to remove the infection lowers the risk of stomach cancer. NCI also notes that experts caution against testing and treating everyone who has no symptoms, partly because of antibiotic resistance. Ask your care team whether testing makes sense for you.

Other infections to know

A few other infections are linked to cancer:

  • Epstein-Barr virus (EBV): NCI lists it among the viruses linked to cancer. NCI says most people infected with EBV never develop cancer.
  • HIV: NCI lists it as an infection that weakens the immune system, which can raise cancer risk. NCI notes that antiviral treatment exists.
  • Certain parasites: NCI lists two parasites linked to cancer, Opisthorchis viverrini and Schistosoma haematobium. Antiparasitic drugs exist.

What you can do

You cannot control everything, but some steps help. Many are part of ordinary healthy living and need no special equipment or expense:

  • Getting recommended vaccines on schedule, such as those for HPV and hepatitis B
  • Asking your provider whether testing for any of these infections makes sense for you
  • Following treatment if you are diagnosed with an infection
  • Using condoms, which lower but do not remove the chance of spreading HPV
  • Not sharing needles or personal items that may carry blood
  • Keeping up with regular checkups and recommended screenings

If you carry one of these infections, regular follow-up and any recommended screening can help catch problems early. If you are unsure which steps apply to you, your healthcare team can tell you which tests or vaccines make sense based on your age, history, and situation.

Keeping the risk in perspective

It can be unsettling to learn that germs can play a role in cancer. But a few points help keep this in balance.

  • Most cancers are not caused by infections.
  • Many people who carry these infections, such as HPV or EBV, never develop cancer.
  • Many of these infections can be prevented, found, or treated.

In other words, this is an area where knowledge leads to action. Unlike some cancer risk factors, infections can often be tackled head-on with vaccines, tests, and treatment.

A clinician in blue scrubs and blue gloves injects a vaccine into the upper arm of a seated teenage girl under an HPV vaccine poster.

Common questions

How can an infection cause cancer?

Infections can lead to cancer in a few ways. Some viruses disrupt how cells grow. Some infections weaken the immune system. And some cause long-term inflammation, which over time can damage cells and lead to cancer.

Which infections are most linked to cancer?

Common ones include HPV (linked to cervical and other cancers), hepatitis B and C (liver cancer), and H. pylori (stomach cancer). EBV and HIV are also linked to certain cancers.

Are these infections common?

Yes, many are. NCI says about two-thirds of the world's population carries H. pylori, and HPV passes easily between sexual partners. Most HPV infections go away on their own. The risk is higher in some people who carry an infection long-term.

Can I be vaccinated against any of these?

Yes. NCI says vaccines exist for HPV and hepatitis B. Both can help prevent cancers linked to those infections. There is no vaccine for hepatitis C.

How do I know if I have one of these infections?

Many of these infections cause no symptoms. Simple tests can often detect them. If you think you may be at risk, ask your healthcare provider about testing.

If I have one of these infections, will I get cancer?

Not necessarily. Most HPV infections go away on their own, and NCI says most people infected with EBV never develop cancer. Chronic hepatitis B or C can lead to liver cancer, so ask your care team about testing and follow-up.

Questions to ask your doctor

Being prepared helps you get the most out of your appointments. Save or print these questions.

Open my question list

Tap a question to save it to your list (kept on this device).

Talk to a person

Talk with a trained specialist or navigator

Cancer Explained provides educational guidance, but does not replace trained specialists, social workers, or your medical team.

Free & Confidential

Talk to a trained cancer information specialist

Free, confidential assistance from NCI Cancer Information Service via phone, chat, or email.

Contact your oncology team

Locate after-hours contact numbers, portal messages, or urgent triage phone lines.

Find a patient navigator

Get one-on-one help with appointments, logistics, translation, and care coordination.

Find a genetic counselor

Discuss inherited mutation risk, family history, and genetic testing options.

Find an oncology social worker

Access emotional counseling, family support groups, and mental health resources.

Find a financial navigator

Locate copay assistance foundations, grant programs, and lodging/travel support.

Find a clinical-trial specialist

Search matching studies and speak with NCI trial information specialists.

Get urgent help

Severe trouble breathing, chest pain, or any other emergency: call 911 now. Fever of 100.4°F (38°C) or higher during chemo, or severe pain: call your cancer care team right away, day or night.

Call 911

Prepared by Cancer Explained's AI-assisted editorial system

Written from National Cancer Institute material and compared with the source cited below.