Skip to content
RCE Write-up Advanced

CVE-2025–49844: The Flaw That Taught Redis to Talk to the Opera

A use-after-free flaw in Redis's embedded Lua scripting engine lets an attacker who can run Lua scripts manipulate the garbage collector to reuse freed memory and execute operating-system commands. If Redis runs as root, the attacker gains full control of the host.

Rodrigo Gutierrez Follow

Published on ciberseguridad.medium.com

For years, Redis was that silent piece of infrastructure keeping the digital world running without seeking attention. In architecture diagrams it appeared as an auxiliary component — a loyal cache accelerating queries or storing temporary sessions.

Rodrigo Gutierrez, on ciberseguridad.medium.com

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 use-after-free in the Lua scripting engine's garbage collector, where a freed memory segment is reused without proper checks.

Impact

An attacker with script execution permission could run operating-system commands with the Redis process's privileges, potentially gaining full control if it runs as root; many exposed instances without authentication made automated exploitation likely.

What the attacker needed

Ability to run Lua scripts on Redis; Redis exposed or weakly protected

The fix

The text mentions updating to version 8.2.2, but does not explicitly state that this fixes the flaw.

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 a fast in-memory database often used as a cache. It can run small scripts written in Lua, a programming language. A bug in how Redis manages memory while running those scripts lets someone who can send scripts make the server run their own commands, potentially taking over the machine.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.