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
    • 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 Use-After-Free Vulnerability

CVE-2025-49844 is a use-after-free vulnerability in Redis that allows authenticated users to execute malicious Lua scripts, potentially leading to remote code execution. This article covers technical details, affected versions, and mitigation strategies.

Published: March 11, 2026

CVE-2025-49844 Overview

CVE-2025-49844 is a critical use-after-free vulnerability affecting Redis, the popular open-source in-memory database. This vulnerability exists in the Lua scripting engine integrated within Redis and affects versions 8.2.1 and below. An authenticated user can exploit this flaw by crafting a malicious Lua script that manipulates the garbage collector, triggering a use-after-free condition that can potentially lead to remote code execution on the affected server.

Critical Impact

Authenticated attackers can achieve remote code execution on Redis servers through specially crafted Lua scripts, potentially compromising the entire database infrastructure and any systems with access to the Redis instance.

Affected Products

  • Redis versions 8.2.1 and below (all versions with Lua scripting support)
  • LF Projects Valkey (Redis fork)
  • Any application using embedded Redis with Lua scripting enabled

Discovery Timeline

  • 2025-10-03 - CVE-2025-49844 published to NVD
  • 2025-11-12 - Last updated in NVD database

Technical Details for CVE-2025-49844

Vulnerability Analysis

This vulnerability is classified as CWE-416 (Use After Free), a memory corruption issue that occurs when a program continues to reference memory after it has been freed. In the context of Redis, the vulnerability resides in the Lua parser component (deps/lua/src/lparser.c), specifically in how the luaY_parser function handles string objects during script parsing.

The root cause involves improper memory management when creating and using TString objects during Lua script compilation. The original code creates a new string object via luaS_new() and passes it directly to luaX_setinput() without properly anchoring it to the Lua stack. This creates a race condition where the garbage collector could free the string object while it's still being referenced, leading to a use-after-free condition.

Root Cause

The vulnerability stems from the Lua parser's failure to properly root a TString object to the Lua stack before use. When luaS_new(L, name) is called, it allocates a new string object, but without being pushed onto the stack, this object becomes eligible for garbage collection. If the garbage collector runs during subsequent operations (which a malicious script can trigger), the string may be freed while still referenced by the lexer state, creating a dangling pointer that attackers can exploit for code execution.

Attack Vector

The attack requires authenticated access to a Redis server with Lua scripting enabled. An attacker can:

  1. Connect to the Redis server with valid credentials
  2. Submit a specially crafted Lua script using EVAL or EVALSHA commands
  3. The script manipulates garbage collection timing to trigger the use-after-free
  4. Exploit the memory corruption to achieve arbitrary code execution

The network-accessible nature of Redis combined with the scope change capability makes this vulnerability particularly dangerous in multi-tenant or shared infrastructure environments.

c
// Security patch from deps/lua/src/lparser.c
// Source: https://github.com/redis/redis/commit/d5728cb5795c966c5b5b1e0f0ac576a7e69af539

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

The fix properly anchors the TString object to the Lua stack using setsvalue2s() and incr_top() before passing it to luaX_setinput(), preventing garbage collection of the object during parser operations.

Detection Methods for CVE-2025-49844

Indicators of Compromise

  • Unusual or malformed Lua scripts submitted via EVAL or EVALSHA commands
  • Redis server crashes or unexpected restarts indicating memory corruption
  • Anomalous garbage collection patterns in Redis logs
  • Unauthorized processes spawned from the Redis server process
  • Memory access violations or segmentation faults in Redis error logs

Detection Strategies

  • Monitor Redis command logs for suspicious EVAL and EVALSHA commands, particularly those with complex garbage collection manipulation
  • Implement network monitoring to detect unusual patterns of Lua script execution from unexpected sources
  • Deploy runtime application self-protection (RASP) solutions to detect memory corruption attempts
  • Use Redis's SLOWLOG to identify unusual script execution patterns
  • Configure alerting for Redis process crashes or abnormal terminations

Monitoring Recommendations

  • Enable Redis DEBUG logging temporarily during incident investigation to capture detailed command execution
  • Implement host-based intrusion detection to monitor for suspicious child processes from Redis
  • Deploy SentinelOne agents on Redis servers for real-time behavioral analysis and exploit detection
  • Monitor system calls from the Redis process for indicators of successful exploitation
  • Track memory allocation patterns for anomalies indicative of use-after-free exploitation

How to Mitigate CVE-2025-49844

Immediate Actions Required

  • Upgrade Redis to version 8.2.2 or later immediately
  • If immediate patching is not possible, implement ACL restrictions to block EVAL and EVALSHA commands
  • Audit existing Lua scripts for potential malicious content
  • Review Redis access logs to identify any suspicious scripting activity
  • Ensure Redis authentication is enabled and credentials are strong

Patch Information

Redis has released version 8.2.2 which addresses this vulnerability. The patch properly anchors TString objects to the Lua stack during script parsing, preventing garbage collection from freeing objects while still in use.

  • Fixed Version: Redis 8.2.2
  • Patch Commit:GitHub Commit d5728cb5795c966c5b5b1e0f0ac576a7e69af539
  • Security Advisory:GitHub Security Advisory GHSA-4789-qfc9-5f9q
  • Release Notes:Redis 8.2.2 Release

Workarounds

  • Disable Lua scripting by restricting EVAL and EVALSHA commands via Redis ACL configuration
  • Limit network access to Redis servers using firewall rules to trusted IP addresses only
  • Implement strong authentication and use Redis ACLs to restrict scripting permissions to trusted users only
  • Consider running Redis in a containerized environment with restricted capabilities to limit exploitation impact
  • Monitor for the availability of patches for LF Projects Valkey if using that Redis fork
bash
# Redis ACL configuration to disable Lua scripting
# Add to redis.conf or use ACL SETUSER command

# Deny EVAL and EVALSHA commands for all users except admin
ACL SETUSER default -EVAL -EVALSHA

# For specific users, create restricted profiles
ACL SETUSER app_user on >strongpassword ~* +@all -EVAL -EVALSHA -EVALSHA_RO -EVAL_RO

# Verify ACL configuration
redis-cli ACL LIST

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

  • Vulnerability Details
  • TypeUse After Free

  • Vendor/TechRedis

  • SeverityCRITICAL

  • CVSS Score9.9

  • EPSS Probability12.43%

  • 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 Version 8.2.2

  • GitHub Security Advisory GHSA-4789

  • Openwall OSS Security Discussion
  • Vendor Resources
  • GitHub Commit Update
  • Related CVEs
  • CVE-2026-27022: LangGraph Redis Checkpoint SQL Injection

  • CVE-2025-46817: Redis Lua Scripting RCE Vulnerability

  • CVE-2025-27151: Redis Buffer Overflow Vulnerability

  • CVE-2025-62507: Redis RCE Vulnerability via XACKDEL
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