Integer Overflow in GNU Emacs Image Loader Allows Memory Leak
CVE-2026-77219
6.9MEDIUM
What is CVE-2026-77219?
GNU Emacs prior to version 31.0.91 is vulnerable to an integer overflow in its PBM/PPM/PGM image loader. This vulnerability can be exploited by an attacker supplying a specially crafted image with exaggerated dimensions and a high max color index. The image loader performs calculations using signed integers, which may result in the final value wrapping to a negative number when certain dimensions are exceeded. This flaw allows the image loader to bypass bounds checks and access memory beyond the allocated buffer, leading to unintended memory disclosure. The over-read content is subsequently interpreted as pixel values and displayed on the screen, enabling potential data exposure.
Affected Version(s)
Emacs 0