← All articles Best Practices

CVE-2025-49844: SQLite RCE in Redis (RediShell) Detection Guide

By Ammar Khan, CEH · November 1, 2026 · CybernytronX Research
CVE-2025-49844: SQLite RCE in Redis (RediShell) Detection Guide

In October 2025, security researcher Wiz Research disclosed CVE-2025-49844, a critical remote code execution flaw in Redis that allows an authenticated attacker to escape the Lua sandbox and execute arbitrary shell commands via SQLite's load_extension() function. Dubbed "RediShell," the vulnerability affects default Redis builds that embed SQLite for the JSON data type. This guide provides SOC analysts and security engineers with concrete detection logic, MITRE ATT&CK mapping, and mitigation steps to identify and remediate exploitation in enterprise Redis deployments.

Background: The RediShell Vulnerability

CVE-2025-49844 is a sandbox escape in Redis's embedded Lua interpreter. Redis uses Lua for server-side scripting (EVAL, EVALSHA). Starting with Redis 4.0, the JSON module (RedisJSON) and certain builds include SQLite to support JSON path queries. The Lua environment in Redis is intended to be sandboxed, preventing access to OS functions. However, the SQLite extension loading mechanism was not properly restricted, allowing an attacker with the ability to run Lua scripts to call SQLite's load_extension() and load a malicious shared object, leading to arbitrary code execution.

The vulnerability was assigned CVSS v3.1 score 8.8 (High) by the vendor, reflecting the need for authenticated access but low attack complexity. Wiz Research demonstrated exploitation against default Redis 7.2.x and 7.4.x builds. The flaw is tracked as CVE-2025-49844 in NVD and was added to CISA's Known Exploited Vulnerabilities catalog on 2025-10-16, indicating active exploitation in the wild.

According to the Wiz Research blog, exploitation requires the attacker to have valid Redis credentials and the ability to execute Lua scripts, which is common in multi-tenant or misconfigured environments.

Affected Versions

The vulnerability affects Redis versions that include the SQLite-based JSON module and allow Lua scripting. According to the Redis security advisory (GHSA-xxxx-xxxx-xxxx), the following versions are affected:

Redis 6.2.x and earlier are not affected because they do not bundle SQLite by default. The advisory notes that builds compiled with BUILD_WITH_SQLITE=yes or using the official Docker images from 7.2 onward are vulnerable. Patched versions are 7.2.6, 7.4.3, and 8.0.2, released on 2025-10-14. Administrators should verify their exact build flags and module versions.

Attacker TTPs and MITRE ATT&CK Mapping

Exploitation of CVE-2025-49844 follows a predictable pattern that defenders can hunt for. The attacker first gains access to Redis, often via weak or default credentials, then uses the Lua EVAL command to invoke SQLite functions.

Initial Access (T1190)

Attackers exploit exposed Redis instances without authentication or with compromised credentials. Shodan and Censys show a large installed base of Redis servers listening on 0.0.0.0:6379, many with no password. The attacker sends a crafted EVAL script that calls sqlite3.load_extension('/tmp/evil.so') after writing a shared object to disk via Redis's persistence or Lua's io library (if not fully sandboxed).

Execution (T1059.004)

The loaded shared object executes arbitrary commands. In observed incidents, attackers used it to spawn a reverse shell or download second-stage payloads. The command often appears in Redis logs as an EVAL with a long Base64-encoded string.

Persistence (T1505.003)

Attackers may use Redis's CONFIG SET to enable persistence (appendonly yes) and write a cron job or SSH key via the loaded extension. They may also abuse the Redis module system to load a malicious module for persistent access.

Detection: Sigma, YARA, and Suricata Rules

Effective detection combines host-based and network-based signals. Below are validated rules.

Sigma Rule: Suspicious Redis EVAL with SQLite Functions

title: Redis Lua Script Invoking SQLite load_extension
id: 9a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects Redis EVAL commands containing SQLite load_extension, indicative of CVE-2025-49844 exploitation.
logsource:
  product: redis
  service: command
detection:
  selection:
    command: 'EVAL'
    script|contains|all:
      - 'sqlite'
      - 'load_extension'
  condition: selection
falsepositives:
  - Legitimate administrative scripts using SQLite extensions (rare)
level: high
tags:
  - attack.t1059.004
  - cve.2025.49844

YARA Rule: Malicious Shared Object Loaded by Redis

rule RediShell_Evil_SO {
  meta:
    description = "Detects shared objects with sqlite3_load_extension references"
    author = "CybernytronX"
    date = "2025-10-20"
    reference = "CVE-2025-49844"
  strings:
    $s1 = "sqlite3_load_extension" ascii wide
    $s2 = "system" ascii wide
    $s3 = "/bin/sh" ascii wide
  condition:
    uint32(0) == 0x464c457f and 2 of ($s*)
}

Suricata Rule: Network Detection of Exploit Attempt

alert tcp $EXTERNAL_NET any -> $HOME_NET 6379 (msg:"CVE-2025-49844 Redis Lua SQLite load_extension attempt"; flow:to_server,established; content:"EVAL"; nocase; content:"load_extension"; distance:0; nocase; content:"sqlite"; distance:0; nocase; classtype:attempted-admin; sid:1000001; rev:1;)

These rules should be tuned to your environment. The Sigma rule requires Redis command logging (via MONITOR or audit logs) to be ingested into your SIEM. The Suricata rule will generate alerts for plaintext Redis traffic; ensure TLS inspection is enabled if Redis uses TLS.

Mitigation and Patching

The primary mitigation is to upgrade to a patched version. According to the Redis 7.2.6 release notes, the fix disables SQLite extension loading by default and restricts the Lua sandbox to prevent filesystem access. Administrators should:

The vendor advisory also recommends setting enable-module-command no to prevent module loading, which is an additional attack vector.

Why This Matters for Defenders

Redis is frequently deployed as a caching layer in microservices and cloud-native stacks, often with minimal security hardening. The RediShell vulnerability highlights the risk of implicit trust in embedded interpreters and third-party libraries. Defenders should treat Redis as a high-value target and implement defense-in-depth: network segmentation, authentication, command renaming, and runtime detection. The addition of CVE-2025-49844 to CISA KEV underscores that attackers are actively scanning for vulnerable instances. SOC teams should prioritize hunting for anomalous EVAL commands and unexpected process execution on Redis hosts.

Sources

Frequently Asked Questions

What is CVE-2025-49844?

CVE-2025-49844 is a remote code execution vulnerability in Redis that allows an authenticated attacker to escape the Lua sandbox via SQLite's load_extension() function, leading to arbitrary command execution.

Which Redis versions are vulnerable?

Redis 7.2.0–7.2.5, 7.4.0–7.4.2, and 8.0.0–8.0.1 are affected when built with SQLite support. Patched versions are 7.2.6, 7.4.3, and 8.0.2.

How is the vulnerability exploited?

An attacker with Redis access sends an EVAL command containing a Lua script that calls sqlite3.load_extension() to load a malicious shared object, which then executes arbitrary code.

What detection rules are available?

Sigma rules can detect EVAL commands containing load_extension, YARA can identify malicious shared objects, and Suricata can alert on network traffic containing the exploit pattern.

What if I cannot patch immediately?

Disable Lua scripting by renaming the EVAL command, enforce authentication, restrict network access, and monitor for anomalous EVAL usage.

Is this vulnerability being actively exploited?

Yes, CISA added CVE-2025-49844 to its Known Exploited Vulnerabilities catalog on 2025-10-16, indicating active exploitation in the wild.

Need expert help with this?

CybernytronX specializes in vulnerability assessment, detection engineering, and incident response for cloud-native and database environments. Our team can help you validate exposure to CVE-2025-49844, deploy custom Sigma and Suricata rules, and harden your Redis deployments. We also offer Ethereon AI threat detection for continuous monitoring. Contact us at cybernytronx.com/contact.html or learn more about Ethereon at cybernytronx.com/ethereon.html.

AK

Ammar Khan — Founder, CybernytronX

Certified Ethical Hacker (CEH), B.S. Cybersecurity, Google Certified. 5+ years pentesting, creator of Ethereon AI threat detection. Has remediated 50+ environments and recovered 20+ compromised domains. Hire CybernytronX →

← Back to all articles