Lucene search
+L

'//WEB-INF/' Information Disclosure Vulnerability (HTTP)

🗓️ 01 Feb 2021 00:00:00Reported by Copyright (C) 2021 Greenbone AGType 
openvas
 openvas
🔗 plugins.openvas.org👁 53 Views

'//WEB-INF/' Information Disclosure Vulnerability (HTTP). Prone to exposing sensitive data by allowing access to '/WEB-INF' and '/META-INF' directories through a crafted HTTP GET request. Affected products include Mort Bay Jetty, Apache Tomcat, Ignite Realtime Openfire, Allaire JRUN, and JavaServer Web Dev Kit

Related
Refs
Code
ReporterTitlePublishedViews
Family
cve
CVE
CVE-2000-1050
22 Jan 200105:00
cve
cve
CVE
CVE-2001-0404
24 May 200104:00
cve
cvelist
Cvelist
CVE-2000-1050
22 Jan 200105:00
cvelist
cvelist
Cvelist
CVE-2001-0404
24 May 200104:00
cvelist
exploitdb
Exploit DB
Allaire JRun 3 - Directory Disclosure
23 Oct 200000:00
exploitdb
euvd
EUVD
EUVD-2001-0401
7 Oct 202500:30
euvd
nessus
Tenable Nessus
Allaire JRun Crafted Request Forced Directory Listing
29 Jan 200100:00
nessus
nvd
NVD
CVE-2000-1050
11 Dec 200005:00
nvd
nvd
NVD
CVE-2001-0404
18 Jun 200104:00
nvd
# 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

if(description)
{
  script_oid("1.3.6.1.4.1.25623.1.0.117195");
  script_version("2024-06-12T05:05:44+0000");
  script_cve_id("CVE-2000-1050", "CVE-2001-0404", "CVE-2007-6672");
  script_tag(name:"last_modification", value:"2024-06-12 05:05:44 +0000 (Wed, 12 Jun 2024)");
  script_tag(name:"creation_date", value:"2021-02-01 14:53:40 +0000 (Mon, 01 Feb 2021)");
  script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:P/I:N/A:N");
  script_tag(name:"cvss_base", value:"5.0");
  script_name("'//WEB-INF/' Information Disclosure Vulnerability (HTTP)");
  script_category(ACT_ATTACK);
  script_copyright("Copyright (C) 2021 Greenbone AG");
  script_family("Web Servers");
  script_dependencies("find_service.nasl", "no404.nasl", "webmirror.nasl", "DDI_Directory_Scanner.nasl", "global_settings.nasl");
  script_require_ports("Services/www", 8080);
  script_exclude_keys("Settings/disable_cgi_scanning");

  script_xref(name:"URL", value:"https://www.kb.cert.org/vuls/id/553235");
  script_xref(name:"URL", value:"https://svn.apache.org/repos/asf/tomcat/archive/tc3.2.x/tags/tc3.2.2.b3/container/RELEASE-NOTES");
  script_xref(name:"URL", value:"https://web.archive.org/web/20081015230304/http://www.igniterealtime.org/community/message/163752");
  script_xref(name:"URL", value:"https://marc.info/?l=bugtraq&m=97236316510117&w=2");
  script_xref(name:"URL", value:"https://marc.info/?l=bugtraq&m=98583089425166&w=2");

  script_tag(name:"summary", value:"Various application or web servers / products are prone to an
  information disclosure vulnerability.");

  script_tag(name:"vuldetect", value:"Sends a crafted HTTP GET request and checks the response.");

  script_tag(name:"affected", value:"The following products are known to be affected:

  - Mort Bay Jetty version 6.1.5 and 6.1.6 (other older versions might be affected as well).

  - Apache Tomcat before version 3.2.1.

  - Ignite Realtime Openfire before version 3.4.4 (using an affected Jetty version).

  - Allaire JRUN 3.0

  - JavaServer Web Dev Kit (JSWDK) 1.0.1 for Windows 2000

  Other products might be affected as well.");

  script_tag(name:"insight", value:"The servlet specification prohibits servlet containers from
  serving resources in the '/WEB-INF' and '/META-INF' directories of a web application archive
  directly to clients.

  This means that URLs like:

  http://example.com/WEB-INF/web.xml

  will return an error message, rather than the contents of the deployment descriptor.

  However, some application or web servers / products are prone to a vulnerability that exposes this
  information if the client requests a URL like this instead:

  http://example.com//WEB-INF/web.xml

  http://example.com//web-inf/web.xml

  (note the double slash ('/') before 'WEB-INF').");

  script_tag(name:"impact", value:"Based on the information provided in this file an attacker might
  be able to gather additional info and / or sensitive data about the application / the application
  / web server.");

  script_tag(name:"solution", value:"The following vendor fixes are known:

  - Update Mort Bay Jetty to version 6.1.7 or later.

  - Update Apache Tomcat to version 3.2.1 or later.

  - Update Ignite Realtime Openfire to version 3.4.4 or later.

  For other products please contact the vendor for more information on possible fixes.");

  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("port_service_func.inc");
include("list_array_func.inc");

base_pattern  = "^\s*<(web-app( .+|>$)|servlet(-mapping)?>$)";
extra_pattern = "^\s*</(web-app|servlet(-mapping)?)>$";

port = http_get_port( default:8080 );

foreach dir( make_list_unique( "/", http_cgi_dirs( port:port ) ) ) {

  if( dir == "/" )
    dir = "";

  url = dir + "/WEB-INF/web.xml";
  res = http_get_cache( item:url, port:port );

  # nb: Avoid excessive reporting if the file is directly accessible (already checked by
  # 2018/gb_sensitive_file_disclosures_http.nasl and 2021/gb_web-inf_plain_info_disclosure.nasl).
  if( res &&
      egrep( string:res, pattern:base_pattern, icase:FALSE ) &&
      egrep( string:res, pattern:extra_pattern, icase:FALSE ) )
    continue;

  url = str_replace( string:url, find:"/WEB-INF/web.xml", replace:"//WEB-INF/web.xml" );

  req = http_get( item:url, port:port );
  res = http_keepalive_send_recv( port:port, data:req, bodyonly:TRUE );

  if( res &&
      egrep( string:res, pattern:base_pattern, icase:FALSE ) &&
      egrep( string:res, pattern:extra_pattern, icase:FALSE ) ) {
    report  = http_report_vuln_url( port:port, url:url );
    report += '\nResponse (truncated):\n\n' + substr( res, 0, 1500 );
    security_message( port:port, data:report );
    exit( 0 );
  }

  # nb: We also want to check the lowercase variant (See e.g. CVE-2016-0793 of /pre2008/generic_WEB-INF.nasl).
  url = str_replace( string:url, find:"//WEB-INF/web.xml", replace:"//web-inf/web.xml" );

  req = http_get( item:url, port:port );
  res = http_keepalive_send_recv( port:port, data:req, bodyonly:TRUE );
  if( ! res )
    continue;

  if( egrep( string:res, pattern:base_pattern, icase:FALSE ) &&
      egrep( string:res, pattern:extra_pattern, icase:FALSE ) ) {
    report  = http_report_vuln_url( port:port, url:url );
    report += '\nResponse (truncated):\n\n' + substr( res, 0, 1500 );
    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