# CVE-2026-77219: GNU Emacs integer overflow in PBM image loader

Source: https://junglewise.ai/threats/cve-2026-77219-gnu-emacs-integer-overflow-in-pbm-image-loader  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-21. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-77219 · Severity: high · CVSS 7.1 · Published 2026-08-21

GNU Emacs includes a built-in image viewer that opens and displays images in various formats. A vulnerability in the PBM/PPM/PGM image loader allows an attacker to craft a malicious image file that, when opened by a user (via file browser, email client, or web browser integration), causes Emacs to read sensitive data from memory and display it. This could leak private information such as encryption keys, passwords, or other confidential data stored in the application's memory.

Technologies: [Gnu Emacs](https://junglewise.ai/threats/technologies/emacs). Vendors: [Gnu](https://junglewise.ai/threats/vendors/gnu).

## Quick answers

**Is CVE-2026-77219 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-77219 being exploited in the wild.

**How severe is CVE-2026-77219?** High severity, with a CVSS score of 7.1, published 21 August 2026.

**Which products and versions are affected?** Gnu Emacs before 31.0.91.

**Is there a fix for CVE-2026-77219?** A patch was published on 2026-08: Fix committed to Emacs repository (commit b07e634) by Paul Eggert Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-77219 attacked?** It is attacked over the network or with local access, in a software library.

**Am I affected by CVE-2026-77219?** Check whether you run Gnu Emacs at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The vulnerability is an integer overflow in the PBM/PPM/PGM image loader in src/image.c. The loader calculates the expected pixel buffer size using 32-bit signed integer arithmetic (height * width * channels), which wraps to a negative value when given large dimensions (e.g., 20000x18000 pixels). The negative result bypasses the bounds check, allowing the subsequent pixel-reading loop to read past the allocated heap buffer without bounds validation. An attacker can trigger this by supplying a crafted image file; the vulnerability is reachable through multiple attack vectors including direct file opening, the built-in web browser (eww), email reader (Gnus), and inline image rendering in Org documents. A fix was committed to the Emacs repository (commit b07e634) that avoids the integer overflow by using proper size calculations.

## Affected products

- GNU Emacs before 31.0.91

## Timeline

- 2026-07-02: disclosed: Vulnerability reported to GNU bug tracker by Tristan Madani
- 2026-08: patched: Fix committed to Emacs repository (commit b07e634) by Paul Eggert

## References

- [https://debbugs.gnu.org/cgi/bugreport.cgi?bug=81344](https://debbugs.gnu.org/cgi/bugreport.cgi?bug=81344)
- [https://github.com/emacs-mirror/emacs/commit/b07e634e4cf45162ae0178e32092b040587f2c6c](https://github.com/emacs-mirror/emacs/commit/b07e634e4cf45162ae0178e32092b040587f2c6c)

## Related threats

- [GNU Emacs command injection via TRAMP user field in filename](https://junglewise.ai/threats/cve-2026-108976-gnu-emacs-before-31-2-and-tramp-through-2-8-2-allows-os-command)
- [Emacs Flymake code execution via untrusted files](https://junglewise.ai/threats/cve-2026-96442-a-code-execution-flaw-was-found-in-emacs-affecting-versions-prior)
- [GNU Emacs arbitrary code execution in symbol handling](https://junglewise.ai/threats/cve-2026-96269-gnu-emacs-28-1-through-31-1-allows-arbitrary-code-execution-upon)
- [Emacs TRAMP command injection via malicious filenames](https://junglewise.ai/threats/cve-2026-79992-emacs-tramp-command-injection-via-malicious-filenames)
- [GNU Emacs for Android improper validation in font table parsing](https://junglewise.ai/threats/cve-2026-71394-gnu-emacs-for-android-improper-validation-in-font-table-parsing)
