Recent Vulnerabilities in Redis Server’s Lua Scripting Engin... #1508
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
Scope and affected components
Targets: Redis server’s embedded Lua scripting engine. Attack surface is network-exposed Redis with Lua enabled and an authenticated attacker. Vulnerable/patch levels: Redis versions lower than 8.2.2, 8.0.4, 7.4.6, 7.2.11, or 6.2.20.
CVE-2025-49844 — Use-After-Free in Lua parser (Critical, CVSS 9.9)
• Files/functions:
lparser.c
→luaY_parser
.• How it works: During parsing, the Redis Lua pars...
🔧 Technical Details
GC-timed UAF in Lua parser (CVE-2025-49844): Create memory pressure with
string.rep()
, then forcecollectgarbage('collect')
while the Redis Lua parser is compiling a large source vialoadstring()
. The GC frees aTString
still referenced byluaY_parser
, yielding a controllable UAF that can crash Redis or enable native-code execution beyond the Lua sandbox.Integer wrap in
unpack
(CVE-2025-46817): Supply extremei
/e
indices son = e - i + 1
overflows (e.g.,-1
,2147483647
). Lua then attempts to return far more values than the table contains, causing stack corruption and memory exhaustion—useful for denial of service and potential memory-corruption primitives.Global metatable poisoning (CVE-2025-46818): Because basic-type metatables aren’t read-only, set entries like
getmetatable('').__index
to inje...🤖 Agent Actions
Changes implemented.
What I updated
Why here
Research used
No new file creation was necessary.
This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.