CVE-2026-77219
Description
GNU Emacs before 31.0.91 contains an integer overflow in the PBM/PPM/PGM image loader that allows an attacker to leak heap memory contents by supplying a crafted image with large dimensions and an elevated max color index. The image loader multiplies image dimensions and channel count using signed integer arithmetic; for sufficiently large values, the result wraps to a negative number, bypassing the bounds check and causing the pixel reader to access heap memory past the end of the allocated buffer. The over-read contents are interpreted as pixel color values and rendered on screen.
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
Mitigation details
CVE-2026-77219 NameCVE-2026-77219 DescriptionGNU Emacs before 31.0.91 contains an integer overflow in the PBM/PPM/PGM image loader that allows an attacker to leak heap memory contents by supplying a crafted image with large dimensions and an elevated max color index. The image loader multiplies image dimensions and channel count using signed integer arithmetic; for sufficiently large values, the…
CVE-2026-77219
| Name | CVE-2026-77219 |
| Description | GNU Emacs before 31.0.91 contains an integer overflow in the PBM/PPM/PGM image loader that allows an attacker to leak heap memory contents by supplying a crafted image with large dimensions and an elevated max color index. The image loader multiplies image dimensions and channel count using signed integer arithmetic; for sufficiently large values, the result wraps to a negative number, bypassing the bounds check and causing the pixel reader to access heap memory past the end of the allocated buffer. The over-read contents are interpreted as pixel color values and rendered on screen. |
| Source | CVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
Vulnerable and fixed packages
The table below lists information on source packages.
| Source Package | Release | Version | Status |
|---|---|---|---|
| emacs (PTS) | bullseye | 1:27.1+1-3.1+deb11u5 | vulnerable |
| bullseye (security) | 1:27.1+1-3.1+deb11u6 | vulnerable | |
| bookworm, bookworm (security) | 1:28.2+1-15+deb12u4 | vulnerable | |
| trixie | 1:30.1+1-6 | vulnerable | |
| forky, sid | 1:30.2+1-11 | vulnerable |
The information below is based on the following data on fixed versions.
| Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs |
|---|---|---|---|---|---|---|
| emacs | source | (unstable) | (unfixed) |
Notes
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=81344
Fixed by: https://cgit.git.savannah.gnu.org/cgit/emacs.git/commit/?id=b07e634e4cf45162ae0178e32092b040587f2c6c (emacs-31.0.91)
Apply commands
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=81344Fixed by: https://cgit.git.savannah.gnu.org/cgit/emacs.git/commit/?id=b07e634e4cf45162ae0178e32092b040587f2c6c (emacs-31.0.91)
OS impact
Debian Affected 5 releases
| Version | Status | Fixed in |
|---|---|---|
| trixie | Affected | — |
| sid | Affected | — |
| forky | Affected | — |
| bullseye | Affected | — |
| bookworm | Affected | — |
References
- https://debbugs.gnu.org/cgi/bugreport.cgi?bug=81344
- https://github.com/emacs-mirror/emacs/commit/b07e634e4cf45162ae0178e32092b040587f2c6c
- https://github.com/emacs-mirror/emacs/releases/tag/emacs-31.0.91
- https://www.vulncheck.com/advisories/gnu-emacs-heap-over-read-via-pbm-ppm-pgm-image-loader
- https://security-tracker.debian.org/tracker/CVE-2026-77219
CWEs
CWE-125 CWE-190
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.