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

CVE-2025-46817: Redis Lua Scripting RCE Vulnerability

CVE-2025-46817 is a remote code execution flaw in Redis that exploits Lua scripting through integer overflow. Authenticated attackers can execute arbitrary code. This article covers technical details, affected versions, and mitigation.

Published: April 1, 2026

CVE-2025-46817 Overview

CVE-2025-46817 is an integer overflow vulnerability in Redis, the popular open-source in-memory database. The vulnerability exists in the Lua scripting engine embedded within Redis, where an authenticated user can craft a malicious Lua script that triggers an integer overflow condition. This overflow can potentially be exploited to achieve remote code execution on the affected Redis server.

The vulnerability affects all versions of Redis with Lua scripting support through version 8.2.1. Given Redis's widespread use as a caching layer, session store, and message broker in modern application architectures, this vulnerability poses a significant risk to organizations relying on Redis infrastructure.

Critical Impact

Authenticated attackers can exploit this integer overflow in Redis's Lua scripting engine to potentially achieve remote code execution, compromising the confidentiality, integrity, and availability of the Redis server and connected systems.

Affected Products

  • Redis versions prior to 2.6.12
  • Redis versions 7.0.0 through 7.4.3
  • Redis versions 8.0.0 through 8.2.1

Discovery Timeline

  • 2025-10-03 - CVE-2025-46817 published to NVD
  • 2026-01-27 - Last updated in NVD database

Technical Details for CVE-2025-46817

Vulnerability Analysis

This vulnerability resides in Redis's embedded Lua interpreter, specifically within the luaB_unpack function in lbaselib.c and the luaH_getnum function in ltable.c. The core issue stems from improper handling of integer arithmetic when calculating array sizes and indices, which can result in integer overflow conditions.

When processing specially crafted Lua scripts, the vulnerable code performs arithmetic operations on signed integers without adequate bounds checking. An attacker with authenticated access to execute Lua scripts can manipulate the unpack function parameters to trigger an integer overflow, potentially bypassing security checks and corrupting memory in ways that could lead to arbitrary code execution.

Root Cause

The root cause is an integer overflow vulnerability (CWE-190) in the Lua base library's unpack function. The original implementation calculated the number of elements to unpack using signed integer arithmetic: n = e - i + 1. When an attacker provides carefully chosen values for the start index i and end index e, this calculation can overflow, producing a negative or unexpectedly small value that bypasses the subsequent stack size check.

Attack Vector

The attack requires authenticated access to a Redis server with the ability to execute Lua scripts via the EVAL or EVALSHA commands. An attacker can craft a Lua script that calls the unpack function with specifically chosen parameters designed to trigger the integer overflow. The network-based attack vector combined with low attack complexity makes this vulnerability particularly concerning in environments where Redis is accessible to multiple users or services.

c
// Vulnerable code in deps/lua/src/lbaselib.c
static int luaB_unpack (lua_State *L) {
  int i, e, n;
  luaL_checktype(L, 1, LUA_TTABLE);
  i = luaL_optint(L, 2, 1);
  e = luaL_opt(L, luaL_checkint, 3, luaL_getn(L, 1));
  if (i > e) return 0;  /* empty range */
  n = e - i + 1;  /* number of elements - VULNERABLE TO OVERFLOW */
  if (n <= 0 || !lua_checkstack(L, n))  /* n <= 0 means arith. overflow */
    return luaL_error(L, "too many results to unpack");
  // ...
}

Source: GitHub Redis Commit

The patch addresses this by changing the variable n to an unsigned integer and restructuring the arithmetic to prevent overflow:

c
// Patched code in deps/lua/src/lbaselib.c
static int luaB_unpack (lua_State *L) {
  int i, e;
  unsigned int n;
  luaL_checktype(L, 1, LUA_TTABLE);
  i = luaL_optint(L, 2, 1);
  e = luaL_opt(L, luaL_checkint, 3, luaL_getn(L, 1));
  if (i > e) return 0;  /* empty range */
  n = (unsigned int)e - (unsigned int)i;  /* number of elements minus 1 */
  if (n >= INT_MAX || !lua_checkstack(L, ++n))
    return luaL_error(L, "too many results to unpack");
  // ...
}

Source: GitHub Redis Commit

Detection Methods for CVE-2025-46817

Indicators of Compromise

  • Unusual Lua script executions via EVAL or EVALSHA commands with abnormally large or negative index parameters
  • Redis server crashes or unexpected restarts that may indicate exploitation attempts
  • Memory corruption patterns or segmentation faults in Redis logs
  • Anomalous unpack function calls in Lua scripts with extreme integer values

Detection Strategies

  • Monitor Redis command logs for EVAL and EVALSHA commands, particularly those containing unpack function calls with suspicious parameters
  • Implement network-level monitoring to detect unusual Redis traffic patterns or command sequences from authenticated sessions
  • Deploy runtime application self-protection (RASP) solutions to detect integer overflow exploitation attempts
  • Use Redis's slowlog feature to identify potentially malicious scripts with unusual execution characteristics

Monitoring Recommendations

  • Enable Redis audit logging to capture all Lua script executions for forensic analysis
  • Configure alerting for Redis server crashes or abnormal memory usage patterns
  • Monitor for unusual authentication patterns that could indicate compromised credentials being used to exploit this vulnerability
  • Implement rate limiting on Lua script execution to reduce the attack surface

How to Mitigate CVE-2025-46817

Immediate Actions Required

  • Upgrade Redis to version 8.2.2 or later immediately on all affected systems
  • Review and restrict which users and applications have authenticated access to execute Lua scripts on Redis servers
  • Implement network segmentation to limit access to Redis instances from untrusted networks
  • Audit existing Lua scripts for any suspicious patterns or unexpected unpack usage

Patch Information

Redis has released version 8.2.2 which contains the security fix for this vulnerability. The patch modifies the integer handling in both lbaselib.c and ltable.c to use unsigned integers and implement proper bounds checking. Organizations should apply the patch by upgrading to the latest Redis version. For detailed patch information, refer to the GitHub Security Advisory and the Redis 8.2.2 Release.

Workarounds

  • Disable Lua scripting if not required by setting appropriate ACL rules to deny EVAL and EVALSHA commands
  • Restrict authenticated access to Redis to only trusted internal services and applications
  • Implement firewall rules to ensure Redis is not exposed to untrusted networks
  • Use Redis ACLs to limit which users can execute Lua scripts
bash
# Configuration example - Restrict Lua scripting via Redis ACL
# Create a restricted user without script execution permissions
redis-cli ACL SETUSER restricted_user on >password ~* +@all -@scripting

# Alternatively, disable dangerous commands in redis.conf
rename-command EVAL ""
rename-command EVALSHA ""

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechRedis

  • SeverityHIGH

  • CVSS Score8.8

  • EPSS Probability13.20%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-190
  • Technical References
  • GitHub Redis Release 8.2.2
  • Vendor Resources
  • GitHub Redis Commit Update

  • GitHub Security Advisory GHSA-m8fj-85cg-7vhp
  • Related CVEs
  • CVE-2025-62507: Redis RCE Vulnerability via XACKDEL

  • CVE-2022-0543: Redis Lua Sandbox Escape RCE Vulnerability

  • CVE-2025-32023: Redis HyperLogLog RCE Vulnerability

  • CVE-2024-46981: Redis Database Lua Script RCE Vulnerability
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