The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
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-2025-49844

CVE-2025-49844: Redis RCE Vulnerability via Lua Script

CVE-2025-49844 is a remote code execution vulnerability in Redis that lets authenticated users exploit Lua scripting to trigger use-after-free conditions. This article covers technical details, affected versions, and mitigations.

Updated: May 15, 2026

CVE-2025-49844 Overview

CVE-2025-49844 is a use-after-free vulnerability in Redis affecting versions 8.2.1 and below. An authenticated user can submit a specially crafted Lua script that manipulates the embedded Lua interpreter's garbage collector. The manipulation triggers a use-after-free condition that attackers can leverage for remote code execution on the Redis server. The flaw exists in all Redis versions with Lua scripting enabled and is tracked under [CWE-416]. Redis released version 8.2.2 to address the issue. The Valkey fork (lfprojects:valkey) is also affected because it shares the same Lua scripting code paths.

Critical Impact

Authenticated attackers with access to EVAL or EVALSHA commands can achieve remote code execution on Redis servers running versions 8.2.1 or earlier.

Affected Products

  • Redis versions 8.2.1 and below (all versions with Lua scripting)
  • Valkey (LF Projects fork sharing the affected Lua code paths)
  • Redis fixed in version 8.2.2

Discovery Timeline

  • 2025-10-03 - CVE-2025-49844 published to NVD
  • 2026-03-20 - Last updated in NVD database

Technical Details for CVE-2025-49844

Vulnerability Analysis

The vulnerability resides in Redis's embedded Lua interpreter. Redis exposes the EVAL and EVALSHA commands to allow server-side scripting in Lua. An authenticated client can craft a Lua script that interacts with the Lua garbage collector in a way that frees an object still referenced by the parser. Subsequent use of that freed memory enables attackers to corrupt interpreter state and redirect control flow within the redis-server process. Because Redis typically runs as a long-lived service with access to data, network sockets, and often privileged file paths, code execution within its address space is equivalent to full server compromise. The vulnerability is mapped to [CWE-416] Use After Free.

Root Cause

The root cause is in deps/lua/src/lparser.c. When parsing a Lua chunk, the function luaY_parser calls luaS_new to create a TString for the chunk name, then passes it directly to luaX_setinput without anchoring it on the Lua stack. The garbage collector can free the unreferenced string during parsing, leaving the lexer with a dangling pointer to a freed TString. A crafted script that triggers GC activity during parsing produces a use-after-free.

Attack Vector

Exploitation requires an authenticated session with permission to run Lua scripts. The attacker connects to the Redis instance over the network and issues an EVAL or EVALSHA command carrying the malicious script. No user interaction is required, and exploitation crosses a privilege boundary because the resulting code execution runs with the privileges of the redis-server process.

c
   struct LexState lexstate;
   struct FuncState funcstate;
   lexstate.buff = buff;
-  luaX_setinput(L, &lexstate, z, luaS_new(L, name));
+  TString *tname = luaS_new(L, name);
+  setsvalue2s(L, L->top, tname);
+  incr_top(L);
+  luaX_setinput(L, &lexstate, z, tname);
   open_func(&lexstate, &funcstate);
   funcstate.f->is_vararg = VARARG_ISVARARG;  /* main func. is always vararg */
   luaX_next(&lexstate);  /* read first token */
   chunk(&lexstate);
   check(&lexstate, TK_EOS);
   close_func(&lexstate);
+  --L->top;
   lua_assert(funcstate.prev == NULL);
   lua_assert(funcstate.f->nups == 0);
   lua_assert(lexstate.fs == NULL);

Source: Redis security patch commit d5728cb. The fix anchors the new TString on the Lua stack before invoking the lexer, preventing the garbage collector from reclaiming it during parsing.

Detection Methods for CVE-2025-49844

Indicators of Compromise

  • Unexpected EVAL or EVALSHA commands from clients that do not normally use Lua scripting.
  • Redis server crashes, segmentation faults, or restarts shortly after script execution recorded in the Redis log.
  • New child processes, outbound network connections, or shell activity originating from the redis-server process.
  • Modifications to Redis configuration, ACL definitions, or new keys containing payload-like data following script execution.

Detection Strategies

  • Inspect Redis logs and MONITOR output for EVAL/EVALSHA commands carrying unusually long or obfuscated Lua bodies.
  • Correlate Redis process anomalies (crashes, child process creation, memory spikes) with script execution events using endpoint and host telemetry.
  • Enumerate Redis instances on the network and verify versions against INFO server; flag any reporting redis_version at or below 8.2.1.

Monitoring Recommendations

  • Forward Redis slow log, MONITOR capture, and ACL log events to a central SIEM for command-level visibility.
  • Alert on redis-server spawning unexpected child processes such as sh, bash, python, or curl.
  • Monitor egress connections from hosts running Redis for traffic to unfamiliar destinations following script activity.

How to Mitigate CVE-2025-49844

Immediate Actions Required

  • Upgrade Redis to version 8.2.2 or later on all affected instances.
  • For Valkey deployments, apply the equivalent upstream fix from the project's security advisory.
  • Audit Redis ACLs and remove EVAL and EVALSHA permissions from any user that does not require Lua scripting.
  • Ensure Redis is not exposed to untrusted networks and that requirepass or ACL authentication is enforced.

Patch Information

The fix is included in Redis release 8.2.2 and committed in commit d5728cb. Additional context is available in the GitHub Security Advisory GHSA-4789-qfc9-5f9q and the OpenWall oss-security discussion. A public proof-of-concept exists at the lastvocher/redis-CVE-2025-49844 repository.

Workarounds

  • Disable Lua scripting access by using Redis ACLs to deny EVAL, EVALSHA, EVAL_RO, EVALSHA_RO, FCALL, and FUNCTION commands for all users.
  • Restrict network exposure of Redis to trusted application hosts only via firewall rules or service mesh policies.
  • Run Redis as a non-privileged user inside a hardened container or systemd unit with NoNewPrivileges, seccomp, and read-only file systems to limit blast radius.
bash
# Restrict Lua scripting via Redis ACL (apply per user)
redis-cli ACL SETUSER default -eval -evalsha -eval_ro -evalsha_ro -fcall -fcall_ro -function

# Verify Redis version after upgrade
redis-cli INFO server | grep redis_version

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechRedis

  • SeverityCRITICAL

  • CVSS Score9.9

  • EPSS Probability8.50%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-416
  • Technical References
  • GitHub Release 8.2.2

  • GitHub Security Advisory GHSA-4789

  • OpenWall OSS-Security Discussion

  • GitHub PoC for CVE-2025-49844
  • Vendor Resources
  • GitHub Commit Update
  • Related CVEs
  • CVE-2026-25243: Redis Redis RCE Vulnerability

  • CVE-2026-23631: Redis Redis RCE Vulnerability

  • CVE-2026-23479: Redis In-Memory Store RCE Vulnerability

  • CVE-2025-46817: Redis Lua Scripting RCE 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