Register for the AI for Security Summit: Join Figma, Perplexity & Wiz

CVE-2026-77219
Emacs vulnerability analysis and mitigation

Overview

CVE-2026-77219 is an integer overflow vulnerability in the PBM/PPM/PGM image loader of GNU Emacs that enables heap memory disclosure and potential denial of service. All versions of GNU Emacs before 31.0.91 are affected. The vulnerability was published on August 21, 2026, with a patch released in the emacs-31.0.91 pretest. It carries a CVSS v3.1 base score of 7.1 (High) and a CVSS v4.0 base score of 6.9 (Medium) (Github Advisory, Emacs Release).

Technical details

The root cause is an integer overflow (CWE-190) in src/image.c within the pbm_load function, leading to an out-of-bounds read (CWE-125). The image loader computes the expected buffer size by multiplying image height, width, and channel count using signed integer arithmetic; when sufficiently large dimension values are supplied, the multiplication wraps to a negative number, bypassing the bounds check (p + expected_size > end). This causes the pixel reader to access heap memory beyond the allocated buffer, and the over-read bytes are interpreted as pixel color values and rendered on screen. The fix, committed as b07e634, replaces the naive multiplication with ckd_mul() (checked multiplication) to detect overflow before the bounds check (Emacs Commit, GNU Bug #81344).

Impact

Successful exploitation allows an unauthenticated attacker (with user interaction) to leak sensitive heap memory contents, which are visually rendered as pixel data on the victim's screen — potentially exposing cryptographic keys, credentials, or other in-memory secrets. Additionally, the out-of-bounds read can crash the Emacs process, resulting in a denial of service. The vulnerability is locally scoped with no integrity impact and no lateral movement potential beyond the affected Emacs process (Github Advisory).

Exploitability

There is no public proof-of-concept exploit and no evidence of in-the-wild exploitation as of the time of disclosure. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. The EPSS score is approximately 0.13% (3rd percentile), indicating a low near-term exploitation probability. Exploitation requires user interaction — specifically, a victim must open a specially crafted PBM/PPM/PGM image file in Emacs (Github Advisory).

Exploitation steps

  1. Craft a malicious image: Create a raw-format PBM, PPM, or PGM image file with extremely large width and height values and an elevated max color index (e.g., >255 to trigger two-byte mode), such that height * width * channels overflows a signed integer and wraps to a negative value.
  2. Deliver the image to the target: Send the crafted image to the victim via email attachment, file share, or web download, relying on social engineering to prompt the user to open it in Emacs.
  3. Trigger image loading: The victim opens the crafted image file in Emacs (e.g., via find-file or drag-and-drop), causing pbm_load in src/image.c to process the malicious header.
  4. Bypass bounds check: The integer overflow causes the computed expected_size to be negative, bypassing the p + expected_size > end guard, and the pixel reader reads heap memory past the end of the allocated buffer.
  5. Observe leaked memory: The over-read heap bytes are interpreted as pixel color values and rendered on screen, potentially exposing sensitive in-memory data to an attacker with visual or remote access to the display (Emacs Commit, GNU Bug #81344).

Indicators of compromise

  • File System: Presence of unusually large or malformed .pbm, .ppm, or .pgm files with anomalous header values (e.g., width/height values near INT_MAX) in user download directories or email attachments.
  • Logs: Emacs error messages such as "Invalid image size in image" in *Messages* buffer or system logs, which may indicate attempted exploitation that triggered the error path (patched versions) or silent over-read (unpatched versions).
  • Process: Unexpected Emacs crashes (SIGSEGV or SIGABRT) when opening image files, potentially indicating a heap corruption or out-of-bounds read condition.

Mitigation and workarounds

Upgrade GNU Emacs to version 31.0.91 or later, which includes the fix in commit b07e634 replacing unsafe signed integer multiplication with overflow-checked ckd_mul() calls in pbm_load. Until patching is feasible, users should avoid opening PBM, PPM, or PGM image files from untrusted sources in Emacs, and use alternative image viewers for such files. Linux distribution users should apply vendor-provided security updates (e.g., Fedora, openSUSE packages) as they become available (Emacs Release, Emacs Commit).

Community reactions

The vulnerability was reported by Tristan Madani via the GNU bug tracker (bug #81344) and was promptly fixed by the Emacs maintainers. Linux distribution security teams (Fedora, openSUSE) issued advisories and updated packages shortly after disclosure. No significant broader media coverage or notable researcher commentary beyond the initial bug report and vendor patch has been identified (GNU Bug #81344).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Affected

bookworm

emacs

Affected

sid

emacs

Affected

trixie

emacs

Affected

Ubuntu

Unknown

bionic (esm-apps)

xemacs21

Unknown

bionic (esm-infra)

emacs25

Unknown

devel

emacs

Unknown

focal (esm-apps)

emacs

Unknown

jammy

emacs

Unknown

jammy (esm-apps)

emacs

Unknown

noble

emacs

Unknown

noble (esm-apps)

emacs

Unknown

RHEL / CentOS

Affected

RHEL 8

emacs.src

Affected

RHEL 9

emacs.src

Affected

RHEL 10

emacs.src

Affected

SourceThis report was generated using AI

Related Emacs vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-79992HIGH7.8
  • Emacs logoEmacs
  • emacs-filesystem
NoYesAug 25, 2026
CVE-2026-77219MEDIUM6.9
  • Emacs logoEmacs
  • emacs-el
NoYesAug 21, 2026
CVE-2026-71394MEDIUM5.3
  • Emacs logoEmacs
  • cpe:2.3:a:gnu:emacs
NoYesAug 10, 2026
CVE-2026-71393MEDIUM5.3
  • Emacs logoEmacs
  • xemacs21-packages
NoYesAug 10, 2026
CVE-2026-71392MEDIUM5.3
  • Emacs logoEmacs
  • emacs
NoYesAug 10, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management