The discovery that certain viruses or bacteria can cause cancer has created avenues for cancer prevention. The human papillomavirus (HPV) vaccine can prevent cervical, anal, throat and other HPV-related cancers, while vaccination against hepatitis B (HBV) can prevent liver cancer. There is no vaccine against hepatitis C (HCV), but testing for the disease and treating it can reduce liver cancer risk.

Helicobacter pylori (H. pylori) is the primary cause of stomach cancer. Studies have shown that using antibiotics to treat people with ulcers who test positive for H. pylori bacteria can help keep stomach cancer from developing.

Interactive maps and charts developed by the International Agency for Research on Cancer illustrate the percentage of cancers caused by infections in different parts of the world and, by extension, the many opportunities for cancer prevention.