# CVE-2025-49844: Redis Lua Use-After-Free may lead to remote code execution

> An authenticated attacker can trigger a use-after-free via crafted Lua scripts in Redis, potentially leading to remote code execution.

- **Severity:** Critical 10.0 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 3 Oct 2025
- **Updated:** 20 Mar 2026
- **Also known as:** ALPINE-CVE-2025-49844, AZL-68226, AZL-68352, AZL-68363, AZL-68426, BELL-CVE-2025-49844, BIT-keydb-2025-49844, BIT-redis-2025-49844, BIT-valkey-2025-49844, CLEANSTART-2026-NI16079, CLSA-2025-1760107506, DEBIAN-CVE-2025-49844, GHSA-4789-qfc9-5f9q, MINI-2c4g-q773-r3gr, MINI-cc5x-vpvp-54h8, MINI-hhhw-83g9-vg9m, MINI-m9cp-64qr-rqvg, MINI-x5cq-xq5q-r9c4, OESA-2026-1063, UBUNTU-CVE-2025-49844, USN-7824-1, USN-7824-2, USN-7824-3, USN-8262-1

## What is CVE-2025-49844?

CVE-2025-49844 is a critical use after free vulnerability in redis, published on 3 Oct 2025. Any signed-in user can exploit it over the network, with no action from the victim.

### 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 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.

Weakness: CWE-416 (Use After Free)

## Which versions are affected by CVE-2025-49844?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `redis` | Bitnami | All versions | 6.2.20, 7.2.11, 7.4.6, 8.0.4, 8.2.2 |
| `keydb` | Bitnami | All versions | 6.2.20, 7.2.11, 7.4.6, 8.0.4, 8.2.2 |
| `valkey` | Bitnami | All versions | 7.2.11, 8.0.6, 8.1.4 |

Products: Lfprojects Valkey, Redis Redis.

## How do I fix CVE-2025-49844?

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

## Is CVE-2025-49844 being exploited?

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

Public exploit code:

- CVE-2025-49844 (RediShell) (github_poc): https://github.com/raminfp/redis_exploit
- CVE-2025-49844 – Redis Lua Parser Use-After-Free (github_poc): https://github.com/dwisiswant0/CVE-2025-49844
- Proof-of-concept for CVE-2025-49844 (github_poc): https://github.com/saneki/cve-2025-49844
- https://github.com/lastvocher/redis-CVE-2025-49844 (github_poc): https://github.com/lastvocher/redis-CVE-2025-49844
- https://github.com/pedrorichil/CVE-2025-49844 (github_poc): https://github.com/pedrorichil/CVE-2025-49844
- 🚨 Exploit the CVE-2025-49844 Redis Lua interpreter UAF vulnerability to execute arbitrary shellcode and gain persistent backdoor access. (github_poc): https://github.com/Zain3311/CVE-2025-49844

## Other vulnerabilities in redis

- [CVE-2025-67733](https://insights.sbomify.com/CVE-2025-67733/): Valkey Affected by RESP Protocol Injection via Lua error_reply (high 8.5)
- [CVE-2026-21863](https://insights.sbomify.com/CVE-2026-21863/): Malformed Valkey Cluster bus message can lead to Remote DoS (high 7.5)
- [CVE-2026-27623](https://insights.sbomify.com/CVE-2026-27623/): Valkey has Pre-Authentication DOS from malformed RESP request (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-49844 and fix it if it is affected.

What it is: CVE-2025-49844 is a critical use after free vulnerability in redis, published on 3 Oct 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-49844 exists.

Affected packages and fixed versions:
- redis (Bitnami): affected all versions; fixed in 6.2.20, 7.2.11, 7.4.6, 8.0.4, 8.2.2
- keydb (Bitnami): affected all versions; fixed in 6.2.20, 7.2.11, 7.4.6, 8.0.4, 8.2.2
- valkey (Bitnami): affected all versions; fixed in 7.2.11, 8.0.6, 8.1.4

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-49844/ (Markdown: https://insights.sbomify.com/CVE-2025-49844/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-49844
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-49844
- OSV: https://osv.dev/vulnerability/CVE-2025-49844

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-49844/
Summaries are generated and may contain mistakes; the official description above is the record.
