Skip to main content

GNU Emacs CVE-2026-77219

| EUVDEUVD-2026-64138 MEDIUM
Integer Overflow or Wraparound (CWE-190)
2026-08-21 VulnCheck GHSA-q8pr-2495-3jw7
6.9
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft PBM/PPM/PGM with extreme dimensions
  2. Delivery
    Deliver malicious image to target user
  3. Exploit
    User opens image in Emacs
  4. Execution
    Signed integer overflow wraps expected_size negative
  5. Persist
    Bounds check bypassed, heap over-read occurs
  6. Impact
    Heap memory rendered as pixel colors on screen

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer overflow checks
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the target to open a specially crafted PBM, PPM, or PGM image file in a vulnerable GNU Emacs instance (any version before 31.0.91). User interaction is mandatory per the CVSS 4.0 vector (UI:P) - the victim must actively open or preview the malicious file within Emacs. No authentication, elevated privileges, or special Emacs configuration is required; the vulnerable pbm_load code path is reachable by any Emacs user who opens one of the three affected image formats. Exploitation is limited by the local attack vector (AV:L): the attacker cannot trigger this remotely without first delivering the malicious file and inducing the user to open it. The over-read is bounded by process heap layout and ASLR, so the specific heap contents exposed will vary by environment and session state.

Impact

The CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VA:H) places this at a score of 6.9, reflecting local attack vector with user interaction required but no privilege prerequisite. The high confidentiality impact (VC:H) is well-supported: heap over-read contents rendered visually could expose sensitive in-process data such as authentication tokens, editor buffers, or process memory from other operations. The high availability impact (VA:H) is plausible - reading past the heap buffer boundary can trigger a segmentation fault or crash the Emacs process. The local attack vector (AV:L) and mandatory user interaction (UI:P) are the primary risk-limiting factors; this is not remotely exploitable unless an attacker can deliver a file and convince the user to open it. No KEV listing means no confirmed active exploitation. No public POC has been identified. EPSS data is not provided; given the constrained vector, exploitation probability is expected to be low. There is no conflict between the CVSS signals and the description: the local vector is consistent with a file-format parsing vulnerability in a desktop application.

Exploit ScenarioDerived

An attacker crafts a PBM, PPM, or PGM image with extreme dimension values (e.g., width and height set near INT_MAX/3 to cause signed overflow after channel multiplication) and delivers it to a target via email attachment, shared filesystem, or download link. When the Emacs user opens the file - including inadvertently via file-manager preview or M-x find-file - the integer overflow bypasses the buffer bounds check, and the pixel reader fetches heap data beyond the allocated image buffer, rendering it on-screen as pixel colors. A motivated attacker could recover heap contents by capturing a screenshot or observing the rendered image, potentially extracting sensitive in-memory data.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 21, 2026

Integer overflow in GNU Emacs PBM/PPM/PGM image loader (all versions before 31.0.91) enables heap memory disclosure when a user opens a crafted image file. Signed integer multiplication of image height, width, and channel count wraps to a negative value for sufficiently large inputs, bypassing the allocated-buffer bounds check and allowing the pixel reader to over-read heap contents, which are then rendered on-screen as color values. No active exploitation has been confirmed (not in CISA KEV), and no public exploit code has been identified at time of analysis; however, the VulnCheck-reported CVSS 4.0 score of 6.9 reflects high confidentiality and availability impact under local conditions with user interaction.

RemediationAI

Upgrade GNU Emacs to version 31.0.91 or later; the patched release is available at https://github.com/emacs-mirror/emacs/releases/tag/emacs-31.0.91. The specific fixing commit is b07e634e4cf45162ae0178e32092b040587f2c6c, which replaces unchecked signed-integer multiplication with checked arithmetic using ckd_mul. Users who cannot upgrade immediately should avoid opening untrusted PBM, PPM, or PGM image files within Emacs; this eliminates the attack surface entirely since the vulnerable path is only reached when Emacs processes one of these three image formats. If Emacs is built with the image-loading subsystem disabled at compile time, the vulnerable code path is not present, but rebuilding is generally impractical as a short-term workaround. The GNU bug tracker entry is at https://debbugs.gnu.org/cgi/bugreport.cgi?bug=81344, and VulnCheck's advisory is at https://www.vulncheck.com/advisories/gnu-emacs-heap-over-read-via-pbm-ppm-pgm-image-loader.

Affected VersionsENISA

emacs 0 <31.0.91

Affected Packages

euvd emacs fix: 31.0.91

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw resides in the pbm_load function within src/image.c in GNU Emacs. PBM (Portable Bitmap), PGM (Portable Graymap), and PPM (Portable Pixmap) are simple raster image formats that Emacs parses natively. CWE-190 (Integer Overflow or Wraparound) describes the root cause: the pre-patch code computed expected_size = height * width - and then multiplied by 2 or 3 for multi-byte or color modes - using signed int arithmetic. For attacker-controlled large dimension values, the product exceeds INT_MAX, wraps to a negative number, and the subsequent bounds check (p + expected_size > end) evaluates false even though the true size exceeds the buffer, allowing the raw pixel reader to stride past the end of the allocated heap buffer. The fix replaces this with checked multiplication via ckd_mul, which detects overflow and aborts loading. The CPE cpe:2.3:a:gnu:emacs:*:*:*:*:*:*:*:* with EUVD-affected range emacs 0 < 31.0.91 covers all historical Emacs releases.

Know when Emacs gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 6.9 MEDIUM
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
vuln.today AI 7.1 HIGH

AV:L because user must open a local file; UI:R for mandatory user interaction; PR:N since no elevated privileges are needed; C:H for heap disclosure; A:H for potential crash via out-of-bounds read.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE 7.1 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H
Red Hat 7.1 HIGH

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.1%
Top 97% exploitable
Prevalence
Medium
popular developer/sysadmin text editor, not ubiquitous enterprise infrastructure
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment MSRC Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in Emacs

View all
CVE-2012-0035 CRITICAL
9.3 Jan 19

Untrusted search path vulnerability in EDE in CEDET before 1.0.1, as used in GNU Emacs before 23.4 and other products, a

CVE-2024-39331 CRITICAL
9.8 Jun 23

In Emacs before 29.4, org-link-expand-abbrev in lisp/ol.el expands a %(...) link abbrev even when it specifies an unsafe

CVE-2017-14482 HIGH
8.8 Sep 14

GNU Emacs before 25.3 allows remote attackers to execute arbitrary code via email with crafted "Content-Type: text/enric

CVE-2024-53920 HIGH
7.8 Nov 27

In elisp-mode.el in GNU Emacs before 30.1, a user who chooses to invoke elisp-completion-at-point (for code completion)

CVE-2026-108976 HIGH
7.8 Oct 11

OS command injection in GNU Emacs's TRAMP remote-file library (Emacs releases before 31.2, TRAMP through 2.8.2) lets an

CVE-2026-96442 HIGH
7.8 Sep 23

Code execution in GNU Emacs versions prior to 31.2 occurs when Flymake performs on-the-fly syntax checking with a langua

CVE-2024-30202 HIGH
7.8 Mar 25

In Emacs before 29.3, arbitrary Lisp code is evaluated as part of turning on Org mode. Rated high severity (CVSS 7.8), t

CVE-2023-2491 HIGH
7.8 May 17

A flaw was found in the Emacs text editor. Rated high severity (CVSS 7.8), this vulnerability is low attack complexity.

CVE-2023-27986 HIGH
7.8 Mar 09

emacsclient-mail.desktop in Emacs 28.1 through 28.2 is vulnerable to Emacs Lisp code injections through a crafted mailto

CVE-2023-27985 HIGH
7.8 Mar 09

emacsclient-mail.desktop in Emacs 28.1 through 28.2 is vulnerable to shell command injections through a crafted mailto:

CVE-2022-45939 HIGH
7.8 Nov 28

GNU Emacs through 28.2 allows attackers to execute commands via shell metacharacters in the name of a source-code file,

CVE-2014-9483 HIGH
7.5 Aug 28

Emacs 24.4 allows remote attackers to bypass security restrictions. Rated high severity (CVSS 7.5), this vulnerability i

Vendor StatusVendor

SUSE

Severity: Important
Product Status
openSUSE Leap 16.0 Fixed
SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS Affected
SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS Affected
SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS Affected
SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy