CVE-2025-49844: (Pwn2Own) Redis Lua Use-After-Free Remote Code Execution Vulnerability
Redis is an open source, in-memory database that persists on disk. Versions 8.2.1 and below allow an authenticated user to use a specially crafted Lua script to manipulate the garbage collector, trigger a use-after-free and potentially lead to remote code execution. The problem exists in all versions of Redis with Lua scripting. This issue is fixed in version 8.2.2. To workaround this issue without patching the redis-server executable is to prevent users from executing Lua scripts. This can be done using ACL to restrict EVAL and EVALSHA commands.
Other sources
Redis Lua Use-After-Free may lead to remote code execution
— Microsoft
This vulnerability allows remote attackers to execute arbitrary code on affected installations of Redis. Authentication is not required to exploit this vulnerability. The specific flaw exists within the handling of certain string values by the embedded Lua interpreter. The issue results from the lack of validating the existence of an object prior to performing operations on the object. An attacker can leverage this vulnerability to execute code in the context of the service account.
— ZDI
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/redictto a version that resolves this vulnerability.Fixed in 7.3.6+ds-1 - Upgrade
Upgrade
debian/redisto a version that resolves this vulnerability.Fixed in 5:7.0.15-1~deb12u6 - Upgrade
Upgrade
debian/redisto a version that resolves this vulnerability.Fixed in 5:8.0.2-3+deb13u1 - Upgrade
Upgrade
debian/redisto a version that resolves this vulnerability.Fixed in 5:8.0.4-1 - Upgrade
Upgrade
debian/valkeyto a version that resolves this vulnerability.Fixed in 8.1.1+dfsg1-3+deb13u1 - Upgrade
Upgrade
debian/valkeyto a version that resolves this vulnerability.Fixed in 8.1.4+dfsg1-1 - Upgrade
Upgrade
alpine/redictto a version that resolves this vulnerability.Fixed in 7.3.6-r0 - Upgrade
Upgrade
alpine/redisto a version that resolves this vulnerability.Fixed in 7.2.11-r0 - Upgrade
Upgrade
alpine/redisto a version that resolves this vulnerability.Fixed in 8.0.4-r0 - Upgrade
Upgrade
alpine/redisto a version that resolves this vulnerability.Fixed in 8.2.2-r0 - Upgrade
Upgrade
alpine/valkeyto a version that resolves this vulnerability.Fixed in 7.2.11-r0 - Upgrade
Upgrade
alpine/valkeyto a version that resolves this vulnerability.Fixed in 8.1.4-r0 - Upgrade
Upgrade
debian/redisto a version that resolves this vulnerability.Fixed in 5:6.0.16-1+deb11u8Fixed in 5:7.0.15-1~deb12u6Fixed in 5:8.0.2-3+deb13u1Fixed in 5:8.0.4-1 - Upgrade
Upgrade
debian/valkeyto a version that resolves this vulnerability.Fixed in 8.1.1+dfsg1-3+deb13u1Fixed in 8.1.4+dfsg1-1 - Upgrade
Upgrade
Redisto a version that resolves this vulnerability.Fixed in 8.2.2 - Configuration
Use ACL to restrict users from executing the EVAL and EVALSHA commands, preventing execution of Lua scripts when patching is not possible.
Redis ACL EVAL and EVALSHA = restricted
Event History
Frequently Asked Questions
What is the severity of CVE-2025-49844?
CVE-2025-49844 is classified as a high severity vulnerability due to its potential for remote code execution.
How do I fix CVE-2025-49844?
To fix CVE-2025-49844, upgrade Redis to version 8.2.2 or later.
Who is affected by CVE-2025-49844?
CVE-2025-49844 affects Redis versions 8.2.1 and below.
What type of attack can be executed through CVE-2025-49844?
CVE-2025-49844 allows an authenticated user to execute a specially crafted Lua script that can lead to remote code execution.
What components are involved in the exploitation of CVE-2025-49844?
Exploitation of CVE-2025-49844 involves manipulating the garbage collector, leading to a use-after-free condition.