The intestinal epithelium serves as a barrier to discriminate the outside from the inside and is in constant exchange with the luminal contents, including nutrients and the microbiota. Pathogens have evolved mechanisms to overcome the multiple ways of defense in the mucosa, while several members of the microbiota can exhibit pathogenic features once the healthy barrier integrity of the epithelium is disrupted. This not only leads to symptoms accompanying the acute infection but may also contribute to long-term injuries such as genomic instability, which is linked to mutations and cancer. While for Helicobacter pylori a link between infection and cancer is well established, many other bacteria and their virulence factors have only recently been linked to gastrointestinal malignancies through epidemiological as well as mechanistic studies. This review will focus on those pathogens and members of the microbiota that have been linked to genotoxicity in the context of gastric or colorectal cancer. We will address the mechanisms by which such bacteria establish contact with the gastrointestinal epithelium-either via an existing breach in the barrier or via their own virulence factors as well as the mechanisms by which they interfere with host genomic integrity.