Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2024-53920

CVE-2024-53920: GNU Emacs RCE Vulnerability

CVE-2024-53920 is a remote code execution vulnerability in GNU Emacs that allows attackers to execute arbitrary code through unsafe Lisp macro expansion. This article covers technical details, affected versions, and mitigation.

Updated: January 22, 2026

CVE-2024-53920 Overview

CVE-2024-53920 is an arbitrary code execution vulnerability in GNU Emacs affecting the elisp-mode.el component. The vulnerability allows attackers to execute arbitrary code when a user invokes elisp-completion-at-point (for code completion) on untrusted Emacs Lisp source code. This unsafe Lisp macro expansion can also be triggered when a user enables on-the-fly diagnosis that byte compiles untrusted Emacs Lisp source code.

Critical Impact

Attackers can achieve arbitrary code execution on the victim's system by crafting malicious Emacs Lisp files that exploit the unsafe macro expansion behavior in elisp-mode.

Affected Products

  • GNU Emacs versions before 30.1

Discovery Timeline

  • 2024-11-27 - CVE-2024-53920 published to NVD
  • 2025-11-03 - Last updated in NVD database

Technical Details for CVE-2024-53920

Vulnerability Analysis

This vulnerability falls under CWE-94 (Improper Control of Generation of Code - Code Injection). The core issue resides in how GNU Emacs handles Lisp macro expansion during code completion operations within elisp-mode.el.

When a user opens an untrusted Emacs Lisp file and triggers code completion via elisp-completion-at-point, or enables on-the-fly byte compilation diagnostics, Emacs processes the Lisp macros present in the source code. The vulnerability stems from Emacs performing macro expansion on untrusted code without adequate sandboxing or safety checks. This means that maliciously crafted macros embedded in a Lisp file can execute arbitrary code during what users would reasonably expect to be a safe operation (autocomplete or syntax checking).

The attack requires local access and user interaction—specifically, the user must open the malicious file and invoke completion or enable byte compilation diagnostics. However, this is a common workflow for developers, making exploitation practical in real-world scenarios where users may examine unfamiliar code.

Root Cause

The root cause is the lack of isolation between trusted and untrusted code during macro expansion in elisp-mode.el. When the completion system evaluates expressions to determine available completions, or when the byte compiler processes code for diagnostics, Emacs expands macros without distinguishing between safe and potentially malicious code. This design assumes all Lisp code being processed is trusted, which is not valid when editing third-party or downloaded source files.

Attack Vector

The attack vector is local, requiring an attacker to deliver a malicious Emacs Lisp file to the victim. Attack scenarios include:

  1. Supply Chain Attack: Including malicious .el files in an otherwise legitimate project repository
  2. Social Engineering: Convincing a developer to review a malicious Emacs Lisp file
  3. Drive-by Download: Placing malicious files where developers might examine them

Once the victim opens the file in Emacs and triggers code completion (often done automatically by typing or pressing completion keybindings like M-TAB) or enables flycheck/flymake byte-compilation diagnostics, the malicious macro executes with the privileges of the Emacs process.

The vulnerability exploitation mechanism relies on defining macros that execute arbitrary code during their expansion phase. When Emacs attempts to provide completion suggestions, it evaluates the surrounding code context, causing the malicious macro to expand and execute its payload. For detailed technical analysis and proof-of-concept examples, see the Eshay Aron's Emacs Code Execution Post.

Detection Methods for CVE-2024-53920

Indicators of Compromise

  • Unexpected process spawning from Emacs process trees
  • Unusual network connections originating from Emacs
  • Presence of Emacs Lisp files with obfuscated or suspicious macro definitions
  • Modified user configuration files or unexpected Emacs startup behavior

Detection Strategies

  • Monitor process creation events for child processes spawned by Emacs
  • Implement file integrity monitoring on Emacs configuration directories (~/.emacs.d/, ~/.emacs)
  • Use endpoint detection and response (EDR) solutions to track code execution chains originating from text editors
  • Review recently opened Emacs Lisp files for unusual macro definitions or eval expressions

Monitoring Recommendations

  • Enable process auditing to track Emacs subprocess creation
  • Monitor for unexpected file system modifications during Emacs sessions
  • Implement application whitelisting to detect anomalous behavior from Emacs processes
  • Review system logs for indicators of post-exploitation activity following Emacs usage

How to Mitigate CVE-2024-53920

Immediate Actions Required

  • Upgrade GNU Emacs to version 30.1 or later immediately
  • Disable automatic code completion when working with untrusted Emacs Lisp files
  • Disable on-the-fly byte compilation diagnostics (flycheck/flymake for elisp) when reviewing untrusted code
  • Review any recently opened Emacs Lisp files from untrusted sources for potential compromise

Patch Information

GNU has addressed this vulnerability in Emacs version 30.1. Users should upgrade to this version or later to receive the security fix. The patched version implements safer handling of macro expansion during code completion operations.

For version information and release details, refer to the GNU Emacs Version Tag and the Emacs News Release Notes. Debian users should consult the Debian LTS Security Announcement for distribution-specific patches.

Workarounds

  • Open untrusted Emacs Lisp files with emacs -Q (no-init-file mode) to minimize risk
  • Disable elisp-completion-at-point by removing it from completion functions when reviewing untrusted code
  • Use a sandboxed environment or virtual machine when examining untrusted Emacs Lisp files
  • Consider using read-only mode (C-x C-q) when reviewing suspicious files to prevent accidental triggering of completion
bash
# Launch Emacs in safe mode for reviewing untrusted files
emacs -Q --no-site-file untrusted-file.el

# Alternative: Use view-only mode
emacs --eval "(add-hook 'find-file-hook 'read-only-mode)" untrusted-file.el

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechGnu Emacs

  • SeverityHIGH

  • CVSS Score7.8

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-94
  • Technical References
  • Eshay Aron's Emacs Code Execution Post

  • GNU Emacs Version Tag

  • Emacs Change Log Entry

  • Emacs News Release Notes

  • Hacker News Discussion

  • Yhetil Emacs Mailing List Post

  • Debian LTS Security Announcement
  • Related CVEs
  • CVE-2024-39331: GNU Emacs Org Mode RCE Vulnerability

  • CVE-2022-45939: GNU Emacs Command Injection Vulnerability

  • CVE-2026-6861: GNU Emacs Memory Corruption DoS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English