5 Medium
CVSS2
Attack Vector
NETWORK
Attack Complexity
LOW
Authentication
NONE
Confidentiality Impact
PARTIAL
Integrity Impact
NONE
Availability Impact
NONE
AV:N/AC:L/Au:N/C:P/I:N/A:N
9.3 High
AI Score
Confidence
High
0.109 Low
EPSS
Percentile
95.1%
Your web server reveals the physical path of the webroot
when asked for a non-existent page.
Whilst printing errors to the output is useful for debugging applications,
this feature should not be enabled on production servers.
# SPDX-FileCopyrightText: 2003 Michel Arboi
# 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.11714");
script_version("2024-06-13T05:05:46+0000");
script_tag(name:"last_modification", value:"2024-06-13 05:05:46 +0000 (Thu, 13 Jun 2024)");
script_tag(name:"creation_date", value:"2005-11-03 14:08:04 +0100 (Thu, 03 Nov 2005)");
script_xref(name:"URL", value:"http://www.securityfocus.com/bid/3341");
script_xref(name:"URL", value:"http://www.securityfocus.com/bid/4035");
script_xref(name:"URL", value:"http://www.securityfocus.com/bid/4261");
script_xref(name:"URL", value:"http://www.securityfocus.com/bid/5054");
script_xref(name:"URL", value:"http://www.securityfocus.com/bid/8075");
# Note: the way the test is made will lead to detecting some
# path disclosure issues which might be checked by other plugins
# (like #11226: Oracle9i jsp error). I have reviewed the reported
# "path disclosure" errors from bugtraq and the following list
# includes bugs which will be triggered by the NASL script. Some
# other "path disclosure" bugs in webservers might not be triggered
# since they might depend on some specific condition (execution
# of a cgi, options..)
# jfs - December 2003
script_cve_id("CVE-2003-0456", "CVE-2001-1372");
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_name("Non-Existent Page Physical Path Disclosure Vulnerability");
script_category(ACT_GATHER_INFO);
script_copyright("Copyright (C) 2003 Michel Arboi");
script_family("Web application abuses");
script_dependencies("find_service.nasl", "httpver.nasl", "webmirror.nasl",
"DDI_Directory_Scanner.nasl", "gb_php_http_detect.nasl",
"global_settings.nasl", "gb_microsoft_iis_http_detect.nasl");
script_require_ports("Services/www", 80);
script_exclude_keys("Settings/disable_cgi_scanning");
script_tag(name:"solution", value:"Upgrade your server or reconfigure it.");
script_tag(name:"summary", value:"Your web server reveals the physical path of the webroot
when asked for a non-existent page.
Whilst printing errors to the output is useful for debugging applications,
this feature should not be enabled on production servers.");
script_tag(name:"affected", value:"Pi3Web version 2.0.0 is known to be vulnerable. Other versions
might be affected as well.");
script_tag(name:"solution_type", value:"VendorFix");
script_tag(name:"qod_type", value:"remote_banner");
exit(0);
}
include("http_func.inc");
include("http_keepalive.inc");
include("port_service_func.inc");
exts = make_list( ".", "/", ".html", ".htm", ".jsp", ".shtm", ".shtml", ".cfm" );
asp_exts = make_list( ".asp", ".aspx" );
php_exts = make_list( ".php", ".php3", ".php4", ".php5", ".php7" );
port = http_get_port( default:80 );
# Choose file to request based on what the remote host is supporting
if( http_can_host_asp( port:port ) && http_can_host_php( port:port ) ) {
exts = make_list( exts, asp_exts, php_exts );
} else if( http_can_host_asp( port:port ) ) {
exts = make_list( exts, asp_exts );
} else if( http_can_host_php( port:port ) ) {
exts = make_list( exts, php_exts );
}
foreach ext( exts ) {
file = "non-existent-" + rand();
url = "/" + file + ext;
req = http_get( item:url, port:port );
res = http_keepalive_send_recv( port:port, data:req );
if( ! res ) continue;
if( egrep( string:res, pattern:strcat("[C-H]:(\\[A-Za-z0-9_.-])*\\", file, "\\", ext ) ) ) {
report = http_report_vuln_url( port:port, url:url );
security_message( port:port, data:report );
exit( 0 );
}
# Unix like path
if( egrep( string:res, pattern:strcat("(/[A-Za-z0-9_.+-])+/", file, "/", ext ) ) ) {
report = http_report_vuln_url( port:port, url:url );
security_message( port:port, data:report );
exit( 0 );
}
}
exit( 99 );