Skip to main content
View

Attack ChainAIDerived

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

  1. Access
    Craft malicious source file
  2. Delivery
    Deliver via repo/email/shared dir
  3. Exploit
    Victim opens file in Emacs
  4. Execution
    Flymake non-Lisp backend runs syntax check
  5. Persist
    Backend executes embedded code
  6. Impact
    Arbitrary code runs as user

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

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

Exploitation Conditions

Requires the victim to open or edit an untrusted file in Emacs (version prior to 31.2) with Flymake mode active AND using a language backend OTHER than Emacs Lisp; the vulnerable backend executes code embedded in the edited file during syntax checking. Limiting factors: exploitation is local (the malicious file must be delivered to and opened by the victim), requires user interaction (UI:R), depends on Flymake being enabled for that file's language, and yields only the privileges of the user running Emacs - no privilege escalation. The fix adds a trusted-content-p / flymake-always-safe gate so untrusted content no longer auto-runs backends.

Impact

This is a genuine code-execution flaw (CWE-94) in Emacs prior to 31.2, tracked and reported by Red Hat with vendor CVSS 7.8 (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H). The vector correctly reflects the real risk profile: exploitation is LOCAL (AV:L) because the malicious payload must reach the victim as a file they open in Emacs, and requires user interaction (UI:R) - merely viewing or editing an untrusted file with Flymake using a non-Lisp language backend triggers arbitrary code execution as the invoking user. PR:N is accurate: no authentication or privileges are needed to craft the file; the constraint is delivery and the victim's action, not credentials. No EPSS score, no CISA KEV listing, and no packaged exploit are present in the input, so this is NOT confirmed as actively exploited - status is 'no public exploit identified at time of analysis.' However, the two upstream fix commits and the oss-security disclosure ARE public, meaning the vulnerable code path and the trust-check that was missing are fully documented, which lowers the barrier to writing a PoC. Net: a real, high-technical-impact priority for environments where developers open untrusted files in Emacs, but not an internet-facing mass-exploitation issue - the local vector and required user interaction cap real-world urgency below what the 7.8 might suggest for a network flaw.

Exploit ScenarioDerived

An attacker crafts a source file (e.g., a project file in a language whose Flymake backend shells out or evaluates content) and delivers it via a repository, email attachment, or shared directory. When the victim opens or edits the file in Emacs with Flymake syntax-checking active, the backend executes attacker-controlled code with the victim's privileges. No standalone weaponized exploit is published, but the upstream fix commits publicly reveal the exact missing trust check.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Sep 23, 2026

Code execution in GNU Emacs versions prior to 31.2 occurs when Flymake performs on-the-fly syntax checking with a language backend other than Emacs Lisp, allowing code embedded in an untrusted file to run with the privileges of the user who opened or edited it. The CVSS vector (AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H) reflects that the attack is local and requires the victim to open a malicious file, but needs no privileges and can fully compromise confidentiality, integrity, and availability of that user's session; the flaw is tracked by Red Hat as CVE-2026-96442 with a vendor score of 7.8. No public exploit code and no confirmed active exploitation were identified at time of analysis, and the risk is concentrated in developer and administration workstations where Emacs commonly opens untrusted source files from downloads, mail attachments, or repositories.

RemediationAI

The primary fix is to upgrade to GNU Emacs 31.2 or later, or to apply the upstream change that adds the trusted-content gate in Flymake; the fix is available as upstream commits (135e6f63f08fee3d374fa1a5187bce941a2d3e3c and abc802ee2eb0b1663349ddf22a461f8e54a383fb) rather than a confirmed tagged release, so upstream fix available (PR/commit); released patched version not independently confirmed beyond the vendor's statement that versions prior to 31.2 are affected. Enterprise users on Red Hat Enterprise Linux 6-10 should monitor https://access.redhat.com/security/cve/CVE-2026-96442 and Bugzilla 2537347 for updated emacs packages and apply them via the normal errata process; because the flaw requires only the privileges of the user running Emacs, treat any host where untrusted files are opened in Emacs as potentially compromised until it is patched. Where immediate upgrading is impossible, concrete compensating controls are: keep flymake-mode disabled for untrusted file types (e.g., open untrusted files after M-x flymake-mode toggles it off, since the trust gate is what the patch adds and pre-31.2 builds have no equivalent protection), and trim risky entries from flymake-diagnostic-functions (notably the Eglot/LSP backend path) for sessions that handle files of unknown provenance - the trade-off is loss of real-time error highlighting and LSP diagnostics, which is the same functional cost the upstream fix imposes on untrusted buffers. A stronger but heavier control is to open and inspect untrusted documents in a sandboxed or disposable low-privilege environment with network egress restricted, which limits the value of any successful in-editor execution at the cost of additional workflow overhead; note that simply disabling elisp-flymake-byte-compile is not sufficient, because the vulnerability is in the common Flymake invocation path used by non-Lisp backends.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

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

Technical ContextAI · show details

Flymake is Emacs's built-in background syntax-checking framework: it runs functions registered in flymake-diagnostic-functions (the backends) against buffer content after edits. The root cause is CWE-94 (improper control of generation of code, i.e., code injection): for buffers whose content is not trusted, Flymake invoked the configured backend without any trust gate, and backends such as the Eglot/LSP path can cause code from the edited file to be evaluated rather than merely parsed. The upstream fix implements a trust boundary in the Flymake core (lisp/progmodes/flymake.el): a backend is only applied when (trusted-content-p) is true or when the backend function carries the flymake-always-safe property; untrusted buffers now emit a message and signal user-error instead of running the backend. The patch also removes the now-redundant trusted-content-p guard from elisp-flymake-byte-compile in lisp/progmodes/elisp-mode.el (moved to the common core) and explicitly marks eglot-flymake-backend as flymake-always-safe in lisp/progmodes/eglot.el, reflecting that the Eglot backend carries no risk beyond Eglot itself. Affected CPE data from Red Hat covers Emacs as shipped in Red Hat Enterprise Linux 6, 7, 8, 9, and 10, so the exposure is not confined to upstream builds but includes long-lived distribution packages.

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 (redhat) PRIMARY 7.8 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI 7.8 HIGH

Local delivery of a malicious file (AV:L) opened by the user (UI:R) with no prior auth (PR:N) yields full code execution as that user, so C/I/A:H, scope unchanged.

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

Primary rating from Vendor (redhat).

CVSS VectorVendor: redhat

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

A code execution flaw was found in Emacs, affecting versions prior to 31.2. The Flymake mode using language backends other than Lisp would execute arbitrary code from the edited file while performing syntax checking. Viewing or editing untrusted files using Emacs could lead to arbitrary code execution with the privileges of the user running Emacs.

Executive ViewAI

Why It Matters

A code-execution flaw in GNU Emacs (all versions prior to 31.2) allows malicious content embedded in an untrusted file to run with the privileges of the user who opens it, because the built-in Flymake syntax-checking feature invokes third-party language backends. The exposure is concentrated on developer and administrator workstations, where Emacs routinely opens source files pulled from repositories, downloads, and email attachments, so a single careless file open can hand an attacker that employee's credentials, tokens, and repository access. Because successful exploitation can fully compromise the confidentiality, integrity, and availability of that user's session, and because no vendor patch or public exploit code has been identified at this time, leadership should treat this as a manageable but time-sensitive operational risk rather than an emergency incident.

Business Impact: Medium
Compensating Controls

No vendor-released patch identified at time of analysis. Until a fixed release is available and deployed, disable Flymake or restrict it to the Emacs Lisp backend only, avoid opening untrusted source files, downloads, or mail attachments in Emacs, run Emacs under a least-privilege account isolated from production credentials and signing keys, and apply sandboxing or containerization to limit the blast radius of any code execution.

Threat Intelligence Overview

EPSS Score
0.2%
Top 95% exploitable
Prevalence
Medium
Emacs is a widely-used developer editor bundled across Linux distros, not universal
Data Quality
7 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 HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact
Medium
Technical Impact
Total

Priority Score

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

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Affected Products (CPE)CVE.org

cpe:2.3:a:red_hat:red_hat_enterprise_linux_10:*:*:*:*:*:*:*:*
cpe:2.3:a:red_hat:red_hat_enterprise_linux_6:*:*:*:*:*:*:*:*
cpe:2.3:a:red_hat:red_hat_enterprise_linux_7:*:*:*:*:*:*:*:*
cpe:2.3:a:red_hat:red_hat_enterprise_linux_8:*:*:*:*:*:*:*:*
cpe:2.3:a:red_hat:red_hat_enterprise_linux_9:*:*:*:*:*:*:*:*

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-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

CVE-2026-96269 HIGH
7.5 Sep 22

Arbitrary code execution in GNU Emacs 28.1 through 31.1 is triggered simply by opening a crafted file: an untrusted read

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Server 16.0 SUSE Linux Enterprise Server for SAP applications 16.0 Fixed
openSUSE Leap 16.0 Fixed
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS Affected
SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS Affected

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