Skip to content
Memory corruption Write-up Advanced

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

A flaw in Redis's Lua scripting engine allowed an authenticated user to craft a script that manipulated the garbage collector and triggered a use-after-free, which could potentially lead to remote code execution. The advisory rates it critical but notes exploitation requires authenticated access first.

redis.io

Published on redis.io

Events & webinarsBlogVideosGlossaryResourcesArchitecture DiagramsDemo Center

Redis, on redis.io

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a memory management flaw in the Lua interpreter integration where a crafted script could free an object that was still referenced, causing a use-after-free.

Impact

An authenticated attacker could potentially achieve remote code execution on the Redis host, though the advisory states exploitation requires authenticated access first and reports no evidence of exploitation in the wild.

What the attacker needed

Authenticated access to Redis; ability to run Lua scripts

The fix

It was fixed in the listed Redis OSS/CE/Stack and Redis Software releases, and at-risk Redis Cloud subscriptions were patched automatically.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Redis is an in-memory database, and it can run small programs written in a language called Lua. A use-after-free is a memory bug where a program keeps using a piece of memory after it has been freed, which can let an attacker take control. Here, someone who already had a login to Redis could send a crafted script that might let them run their own code on the server.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.