6.7 Medium
AI Score
Confidence
Low
5 Medium
CVSS2
Access Vector
Access Complexity
Authentication
NONE
Confidentiality Impact
PARTIAL
Integrity Impact
NONE
Availability Impact
NONE
AV:N/AC:L/Au:N/C:P/I:N/A:N
0.013 Low
EPSS
Percentile
86.0%
Caucho Resin is prone to a path traversal vulnerability.
# SPDX-FileCopyrightText: 2023 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:caucho:resin";
if(description)
{
script_oid("1.3.6.1.4.1.25623.1.0.104804");
script_version("2023-07-03T05:06:07+0000");
script_tag(name:"last_modification", value:"2023-07-03 05:06:07 +0000 (Mon, 03 Jul 2023)");
script_tag(name:"creation_date", value:"2023-06-15 12:34:22 +0000 (Thu, 15 Jun 2023)");
script_tag(name:"cvss_base", value:"5.0");
script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:P/I:N/A:N");
script_cve_id("CVE-2007-2440");
script_tag(name:"qod_type", value:"remote_vul");
script_tag(name:"solution_type", value:"VendorFix");
script_name("Caucho Resin Path Traversal Vulnerability (CVE-2007-2440) - Active Check");
script_category(ACT_ATTACK);
script_copyright("Copyright (C) 2023 Greenbone AG");
script_family("Web Servers");
script_dependencies("gb_caucho_resin_http_detect.nasl", "no404.nasl", "webmirror.nasl", "DDI_Directory_Scanner.nasl");
script_mandatory_keys("caucho/resin/http/detected");
script_require_ports("Services/www", 80);
script_tag(name:"summary", value:"Caucho Resin is prone to a path traversal vulnerability.");
script_tag(name:"vuldetect", value:"Sends a crafted HTTP GET request and checks the response.");
script_tag(name:"insight", value:"There is a path traversal vulnerability in Caucho Resin which
allows remote attackers to read files in arbitrary directories via a '%20..\' in a pathname within
an HTTP request.");
script_tag(name:"affected", value:"The following versions are known to be affected:
- Caucho Resin for Windows version 3.1.0 and 3.0.17 through 3.0.21
- Caucho Resin Professional for Windows version 3.1.0
Other versions might be affected as well.");
script_tag(name:"solution", value:"Update to:
- Caucho Resin for Windows version 3.1.1 or later
- Caucho Resin Professional for Windows version 3.1.1 or later");
script_xref(name:"URL", value:"https://web.archive.org/web/20080618193818/http://www.rapid7.com/advisories/R7-0029.jsp");
exit(0);
}
include("host_details.inc");
include("http_func.inc");
include("http_keepalive.inc");
include("list_array_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);
base_pattern = "^\s*<(web-app( .+|>$)|servlet(-mapping)?>$)";
extra_pattern = "^\s*</(web-app|servlet(-mapping)?)>$";
# nb: We need a valid web application deployed so we are iterating over all known dirs
foreach dir (make_list_unique("/", "/resin-doc", http_cgi_dirs(port: port))) {
if (dir == "/")
dir = "";
# Note: e.g. /%20..\WEB-INF/web.xml is already checked by 2021/gb_web-inf_dotdotbackslash_info_disclosure.nasl
# so no need to test it twice. We're only doing a check for '/resin-web.xml' because it has been
# determined that some targets only have 'resin-web.xml' exposed.
url = dir + "/%20..\WEB-INF/resin-web.xml";
if (http_vuln_check(port: port, url: url, pattern: base_pattern, check_header: TRUE,
extra_check: extra_pattern)) {
report = http_report_vuln_url(port: port, url: url);
security_message(port: port, data: report);
exit(0);
}
}
exit(99);