Redis Patches Critical "RediShell" RCE Flaw (CVE-2025-49844) in Lua Sandbox

Critical "RediShell" RCE Vulnerability (CVE-2025-49844) in Redis Allows Sandbox Escape

CRITICAL
October 7, 2025
5m read
VulnerabilityCloud Security

Related Entities

Organizations

Redis Wiz Federal Office for Information Security (BSI)

Products & Tech

Other

RediShell

CVE Identifiers

CVE-2025-49844
CRITICAL

Full Report

Executive Summary

On October 7, 2025, Redis announced patches for a critical remote code execution (RCE) vulnerability, CVE-2025-49844. Discovered by researchers at Wiz and dubbed "RediShell," the flaw is a use-after-free memory corruption bug that enables an attacker to escape the Lua scripting sandbox and execute arbitrary code on the host operating system. While the vulnerability requires authentication, the risk is dramatically amplified by the widespread misconfiguration of Redis instances. An estimated 60,000 of the 330,000 internet-exposed Redis servers lack authentication, making them vulnerable to unauthenticated RCE. The issue is exacerbated by official Redis container images, which disable authentication by default. Due to the attack's simplicity and Redis's popularity, widespread exploitation is expected.


Vulnerability Details

CVE-2025-49844 ("RediShell") is a critical use-after-free vulnerability in the Redis server's implementation of the Lua scripting engine. Lua scripting is a default feature in Redis, allowing users to execute complex commands atomically.

Technical Description

An attacker with the ability to execute Lua scripts can submit a specially crafted script that triggers a memory corruption condition. This allows the attacker to break out of the constraints of the Lua sandbox and execute native code directly on the server. This provides the attacker with the same level of privilege as the Redis process itself. The attack is reportedly simple to execute once the initial script is developed.

Affected Systems

  • Redis versions that support Lua scripting (default in most modern versions). Specific affected version ranges are detailed in the official Redis advisory.
  • Instances running in containers using the official Redis image are at high risk if they have not been manually configured with authentication.

Exploitation Status

As of October 7, 2025, no active exploitation has been publicly confirmed, but security researchers and agencies like Germany's Federal Office for Information Security (BSI) anticipate that attacks will begin imminently. The combination of a large number of exposed, unauthenticated instances and the severity of the flaw (RCE) makes it a highly attractive target for attackers.

Impact Assessment

Successful exploitation of RediShell grants an attacker full control over the Redis server, leading to severe consequences:

  • Data Theft: Attackers can exfiltrate all data stored within the Redis instance, which often includes sensitive session tokens, user data, and application caches.
  • Lateral Movement: If the Redis server is running in a cloud environment like AWS or GCP, the attacker can steal IAM role credentials from the instance metadata service. This allows them to pivot and attack other cloud resources. (T1528 - Steal Application Access Token)
  • Ransomware/Cryptojacking: The attacker can use the compromised server to deploy ransomware within the network or install cryptomining malware, consuming system resources. (T1496 - Resource Hijacking)
  • Persistence: The attacker can establish persistence on the host system, ensuring continued access even if the Redis service is restarted. (T1547.001 - Registry Run Keys / Startup Folder)

Cyber Observables for Detection

Detection efforts should focus on Redis server logs and host-based monitoring.

Type Value Description
log_source Redis Logs Monitor for execution of unusual or abnormally complex Lua scripts, especially from untrusted sources.
command_line_pattern redis-server Monitor for anomalous child processes spawned by the redis-server process, such as shells (/bin/sh, bash) or network utilities (curl, wget).
network_traffic_pattern Outbound connections from Redis server A Redis server should typically only communicate with application servers. Alert on any outbound connections to the internet or other unexpected systems.
port 6379 Monitor for connection attempts to the default Redis port from unauthorized or external IP addresses.

Detection Methods

  1. Host-Based Monitoring: Use an EDR agent on Redis hosts to detect suspicious process creation. A redis-server process spawning a shell is a major red flag. This aligns with D3FEND's Process Analysis.
  2. Network Security Monitoring: Analyze network traffic to and from Redis servers. Alert on connections from the public internet if the server should be internal-only. Monitor for large, unexpected data transfers. Use D3FEND's Outbound Traffic Filtering to block unauthorized connections.
  3. Audit Redis Commands: If supported, enable auditing of Redis commands and look for the execution of EVAL or EVALSHA with suspicious-looking Lua scripts.

Remediation Steps

  1. Patch Immediately: Upgrade all Redis instances to the patched versions as specified by Redis. This is the most effective solution and a direct application of D3FEND's Software Update.
  2. Enforce Authentication: For any Redis instance, especially those exposed to the network, enable strong password authentication (the requirepass directive). This is a critical security best practice that would mitigate the unauthenticated attack vector.
  3. Restrict Network Access: Configure firewall rules to ensure that Redis servers are only accessible from the specific application servers that require access. Never expose a Redis instance directly to the public internet. This is a form of D3FEND Inbound Traffic Filtering.
  4. Run as Low-Privilege User: Configure Redis to run as a dedicated, low-privilege user (redis) rather than root. This contains the impact of a successful sandbox escape, preventing an immediate full system compromise.

Timeline of Events

1
October 7, 2025
Redis and Wiz disclose the 'RediShell' vulnerability (CVE-2025-49844) and release patches.
2
October 7, 2025
This article was published

MITRE ATT&CK Mitigations

Upgrade to a patched version of Redis to remediate the vulnerability.

Mapped D3FEND Techniques:

Do not expose Redis instances to the internet. Restrict access to only trusted application servers.

Mapped D3FEND Techniques:

Enforce strong password authentication on all Redis instances using the 'requirepass' directive.

Mapped D3FEND Techniques:

Run Redis in a container with minimal privileges and strict resource limits to contain the impact of a sandbox escape.

Mapped D3FEND Techniques:

D3FEND Defensive Countermeasures

The primary and most effective remediation for CVE-2025-49844 is to upgrade all Redis instances to the patched versions provided by the vendor. This should be treated as an emergency change. Use asset inventory and vulnerability management systems to identify all Redis instances across the environment, including those in development and containerized workloads. Prioritize patching for internet-exposed instances first, followed by internal production servers. After patching, verify the version upgrade was successful on all hosts. This action directly closes the use-after-free vulnerability, preventing any attacker from executing the RediShell exploit.

As a critical defense-in-depth measure, immediately enforce authentication on all Redis instances. Edit the redis.conf file and set a strong, unique password for the requirepass directive. This single configuration change mitigates the risk for the ~60,000 unauthenticated instances exposed to the internet, forcing an attacker to first guess or steal a password before they can even attempt to run the malicious Lua script. Additionally, if Lua scripting is not required for business operations, consider disabling it by renaming or removing the EVAL and EVALSHA commands in the configuration file. These hardening steps dramatically reduce the attack surface, even on unpatched systems.

No Redis server should ever be directly exposed to the public internet. Implement strict firewall rules at the network perimeter and on the host itself (host-based firewall) to ensure the Redis port (default 6379) is not accessible from untrusted networks. Access should be restricted to the specific IP addresses of the application servers that need to communicate with it. For cloud environments, use security groups or network ACLs to enforce this policy. This network-level control acts as a powerful compensating measure, preventing remote attackers from reaching the vulnerable service in the first place, regardless of its patch or authentication status.

Article Author

Jason Gomes

Jason Gomes

• Cybersecurity Practitioner

Cybersecurity professional with over 10 years of specialized experience in security operations, threat intelligence, incident response, and security automation. Expertise spans SOAR/XSOAR orchestration, threat intelligence platforms, SIEM/UEBA analytics, and building cyber fusion centers. Background includes technical enablement, solution architecture for enterprise and government clients, and implementing security automation workflows across IR, TIP, and SOC use cases.

Threat Intelligence & AnalysisSecurity Orchestration (SOAR/XSOAR)Incident Response & Digital ForensicsSecurity Operations Center (SOC)SIEM & Security AnalyticsCyber Fusion & Threat SharingSecurity Automation & IntegrationManaged Detection & Response (MDR)

Tags

RCERedisSandbox EscapeVulnerabilityWizCloud Security

📢 Share This Article

Help others stay informed about cybersecurity threats

Continue Reading