Sensory stimuli can mediate cognition and behavior in different ways. In humans, chemosensory threat cues enhance performance and increase vigilance. In non-human primates, visual, olfactory and even tactile cues of biological contaminants elicit avoidance behaviors, i.e. manifestations of the adaptive system of disgust in humans. Nevertheless, how contaminant sensory cues may affect cognitive processes in non-human primates remains largely unexplored. We tested how visual cues suggesting pathogen presence may affect cognitive performance in chimpanzees. We used disgust-related images displayed at regular intervals during a number ordering task on touch screens. Images of carcasses provoked more errors following their display compared to control and other condition images (i.e. invertebrates and food). Our results support the hypothesis that visual disgust elicitors decrease performance by distracting individuals. Future studies should determine whether cognitive responses evolved differently across threat contexts (fear vs. disgust) given their differences in outcomes (death vs. disease).