/

CVE-2026-96442

Severity:

HIGH RISK

(7.8)

Code Injection (CWE-94) in Emacs Flymake Syntax Checks

CVE-2026-96442

Awaiting Analysis

Vulnerability type

Category:

Code Injection

CWE:

CWE-94

Impact:

Arbitrary Code Execution

Severity:

HIGH RISK

(7.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A code execution flaw in Emacs Flymake can cause arbitrary code from an edited file to run when syntax checking uses non-Lisp language backends. Viewing or editing an untrusted file may therefore execute code with the privileges of the user running Emacs.

Affected context

The vulnerability occurs in Emacs Flymake mode when it performs syntax checking through language backends other than Lisp. It becomes risky when untrusted file content is opened or edited and the applicable backend treats that content, or related processing, as executable input during diagnostics.

Exploit preconditions

  • Attack surface: Emacs Flymake syntax-checking workflows - Required access: The attacker must provide or influence a file that a user

opens or edits in Emacs

  • Trigger point: Flymake invokes a non-Lisp language backend while checking

the file

  • Why exploitation is possible: Backend processing can execute code derived

from untrusted file content instead of treating the content solely as data

Why this happens

The underlying bug is insufficient separation between source-file content and executable behavior during Flymake backend processing. A non-Lisp language backend can cause code associated with an edited file to be evaluated while syntax checking is performed. This maps to CWE-94, Improper Control of Generation of Code, because untrusted input influences code that is generated or executed.

Potential impact

  • An attacker could execute arbitrary code in the Emacs process
  • Code execution could occur with the privileges of the current user
  • Confidential files and credentials accessible to that user may be exposed
  • Attackers could modify user data or install persistence
  • Workstations or development environments could be compromised

General mitigation guidance

Mitigation generally focuses on preventing untrusted file content from reaching executable syntax-checking paths. Secure-by-default patterns include treating source files strictly as data, isolating or disabling backends that evaluate file-derived content, and requiring explicit trust decisions before activating project tooling. Restricting Emacs and backend privileges, using sandboxing where practical, and separating editing from execution contexts can reduce impact. Organizations can also limit access to sensitive resources from development environments and avoid automatically enabling language tooling for untrusted projects.

How teams detect issues like this

Detection can include static analysis and code review checks for backend implementations that evaluate source text, construct commands from file content, or invoke interpreters during diagnostics. Reviewers can examine Flymake backend registration, process-spawning logic, quoting and argument handling, and trust-boundary decisions for opened projects. Policy enforcement may restrict automatic activation of language backends for untrusted directories, while endpoint monitoring can flag unexpected child processes launched by Emacs. Automated code review tools may help identify these patterns.

Sources

SourceLink
access.redhat.comaccess.redhat.com/errata/RHSA-2026:84591
access.redhat.comaccess.redhat.com/errata/RHSA-2026:85245
access.redhat.comaccess.redhat.com/errata/RHSA-2026:90800
access.redhat.comaccess.redhat.com/security/cve/CVE-2026-96442
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2537347
github.comgithub.com/emacs-mirror/emacs/commit/135e6f63f08fee3d374fa1a5187bce941a2d3e3c
github.comgithub.com/emacs-mirror/emacs/commit/abc802ee2eb0b1663349ddf22a461f8e54a383fb
openwall.comopenwall.com/lists/oss-security/2026/09/14/1

Frequently asked

questions

It is generally indirect rather than a network-service attack. Exploitation

can occur when a user obtains and opens or edits a malicious file in Emacs

with the affected Flymake workflow enabled.

The attacker typically needs only a way to supply or influence a file that the

victim opens or edits. Code execution then occurs in the victim's Emacs

session and uses that user's privileges.

Prevent language backends from evaluating untrusted file content during syntax

checking, and use isolation or explicit trust controls for project tooling.

Treat all opened files and project configuration as untrusted by default,

review backend process execution, apply least privilege, and monitor tools

launched by the editor.

Find out what's already
exploitable in your codebase.