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.
Published: 2026-08-21
Score: 6.9 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Information Disclosure via Heap Over‑Read
Action: Patch Immediately
AI Analysis

Impact

The vulnerability is caused by an integer overflow in the PBM/PPM/PGM image loader of GNU Emacs. The loader calculates buffer size by multiplying image dimensions and channel count with signed integer arithmetic. When the dimensions and color index are large enough, the multiplication overflows to a negative number, bypassing bounds checking. This causes the pixel reader to reference memory past the allocated buffer, leaking contents of the as pixel color values that are rendered on screen. The result is a clear‑text disclosure of arbitrary heap data. The weakness maps to CWE-125 and CWE-190.

Affected Systems

GNU Emacs installations with a version earlier than 31.0.91 are affected. The vulnerability is present in all releases prior to the 31.0.91 release, which contains the fix. Users of older Emacs versions or custom builds that have not incorporated the patch are at risk.

Risk and Exploitability

The CVSS score of 6.9 indicates a moderate severity weakness with potential for significant information leakage. No EPSS score is available, so the probability of exploitation is unknown, and the vulnerability is not listed in CISA’s KEV catalog. The likely attack vector is local: an attacker supplies a crafted image file with large dimensions and an elevated max color index, which forces the Emacs process to load the image. When the image loader performs the signed multiplication, the resulting overflow causes an out‑of‑bounds memory read, and the over‑read heap contents are interpreted as pixel colors and rendered on the screen.

Generated by OpenCVE AI on August 21, 2026 at 22:20 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade GNU Emacs to version 31.0.91 or later, which incorporates the integer‑overflow fix.
  • If an upgrade cannot be performed immediately, avoid loading untrusted PBM/PPM/PGM images from untrusted sources, or use file system permissions to restrict access to image directories.
  • Apply the backported source patch found in commit b07e634e4cf45162ae0178e32092b040587f2c6c to custom builds or if re‑compiling Emacs.

Generated by OpenCVE AI on August 21, 2026 at 22:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 25 Aug 2026 12:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Important


Fri, 21 Aug 2026 22:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 21 Aug 2026 21:45:00 +0000

Type Values Removed Values Added
First Time appeared Gnu
Gnu emacs
Vendors & Products Gnu
Gnu emacs

Fri, 21 Aug 2026 20:45:00 +0000

Type Values Removed Values Added
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.
Title GNU Emacs < 31.0.91 Heap Over-Read via PBM/PPM/PGM Image Loader
Weaknesses CWE-125
CWE-190
References
Metrics cvssV3_1

{'score': 7.1, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H'}

cvssV4_0

{'score': 6.9, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:N/VA:H/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-21T21:42:58.824Z

Reserved: 2026-08-20T18:25:46.943Z

Link: CVE-2026-77219

cve-icon Vulnrichment

Updated: 2026-08-21T21:32:46.866Z

cve-icon NVD

Status : Received

Published: 2026-08-21T21:17:06.590

Modified: 2026-08-21T22:16:45.797

Link: CVE-2026-77219

cve-icon Redhat

Severity : Important

Publid Date: 2026-08-21T20:20:45Z

Links: CVE-2026-77219 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-21T22:30:17Z

Weaknesses