CVE-2025-46818 Redis: Authenticated users can execute LUA scripts as a different user

Medium 6.0 Published Updated

Authenticated users can execute arbitrary Lua code in another user's context, enabling privilege escalation and code execution in Redis.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2025-46818?

CVE-2025-46818 is a medium-severity code injection vulnerability in redis, published on 3 Oct 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

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 different LUA objects and potentially run their own code in the context of another user. The problem exists in all versions of Redis with LUA scripting. This issue is fixed in version 8.2.2. A workaround to mitigate the problem without patching the redis-server executable is to prevent users from executing LUA scripts. This can be done using ACL to block a script by restricting both the EVAL and FUNCTION command families.

Weakness: CWE-94

Which versions are affected by CVE-2025-46818?

3 open source packages ship an affected version, including redis, keydb and valkey. It affects 1 product.

PackageAffectedFixed in
redis BitnamiAll versions6.2.20, 7.2.11, 7.4.6, 8.0.4, 8.2.2
keydb BitnamiAll versions6.2.20, 7.2.11, 7.4.6, 8.0.4, 8.2.2
valkey BitnamiAll versions7.2.11, 8.0.6, 8.1.4

Products include Redis Redis.

How do I fix CVE-2025-46818?

Upgrade redis to a fixed version for your release line: 6.2.20, 7.2.11, 7.4.6 or 8.0.4.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2025-46818 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-46818 exists.

Public exploit code: 1 Nuclei template and 1 proofs of concept on GitHub.

Sources

Also known as ALPINE-CVE-2025-46818, AZL-68241, AZL-68285, BELL-CVE-2025-46818, BIT-keydb-2025-46818, BIT-redis-2025-46818 and 10 more.

Is CVE-2025-46818 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free