This module exploits CVE-2022-0543, a Lua-based Redis sandbox escape. The vulnerability was introduced by Debian and Ubuntu Redis packages that insufficiently sanitized the Lua environment. The maintainers failed to disable the package interface, allowing attackers to load arbitrary libraries. On a typical `redis` deployment (not docker), this module achieves execution as the `redis` user. Debian/Ubuntu packages run Redis using systemd with the "MemoryDenyWriteExecute" permission, which limits some of what an attacker can do. For example, staged meterpreter will fail when attempting to use mprotect. As such, stageless meterpreter is the preferred payload. Redis can be configured with authentication or not. This module will work with either configuration (provided you provide the correct authentication details). This vulnerability could theoretically be exploited across a few architectures: i386, arm, ppc, etc. However, the module only supports x86_64, which is likely to be the most popular version.
Exploit database
Vulnerability
CVE-2022-0543
Vulnerability details
- Score
- 10.0
- Severity
- critical
CVSS 3.1 · CISA-ADP
Vector string
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:HDescription
It was discovered, that redis, a persistent key-value database, due to a packaging issue, is prone to a (Debian-specific) Lua sandbox escape, which could result in remote code execution.
CVE ProgramExploit source choices
11 sourcesRedis Lua Sandbox Escape
2022-02-18redis_debian_sandbox_escape.rb
bigblackhat/ofx
一个开源的、开箱即用的漏洞批量验证框架
2021-06-02301 files · 920 stars
arpsyndicate/kenzer-templates
essential templates for kenzer [DEPRECATED]
2020-09-185,308 files · 118 stars
0x7eteam/cve-2022-0543
CVE-2022-0543_RCE,Redis Lua沙盒绕过 命令执行
2022-03-163 files · 95 stars
d-rn/vulbox
漏洞收集
2021-11-1628 files · 30 stars
z92g/cve-2022-0543
Redis 沙盒逃逸(CVE-2022-0543)POC&EXP
2022-07-062 files · 23 stars
siennaskies/redishack
redis未授权、redis_CVE-2022-0543检测利用二合一脚本
2023-05-103 files · 3 stars
abhinandan-khurana/rediergeon
A Comprehensive Pentest Suite for Redis.
2025-06-1822 files · 1 stars
fulxey/cve-2022-0543
Redis RCE through Lua Sandbox Escape vulnerability
2022-09-053 files · 1 stars
cyberctf/vulhub-redis-cve-2022-0543
Vulhub redis/CVE-2022-0543: Redis Lua Sandbox Escape (CVE-2022-0543), run with Isoloom
2026-10-0816 files · 0 stars
d4n-sec/d4n-sec.github.io
Generated personal blog
2026-11-06385 files · 0 stars