WordPress < 5.0.4 Directory Traversal Vulnerability - Nessus

Medium   Plugin ID: 125596

This page contains detailed information about the WordPress < 5.0.4 Directory Traversal Vulnerability Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 125596
Name: WordPress < 5.0.4 Directory Traversal Vulnerability
Filename: wordpress_5_0_4.nasl
Vulnerability Published: 2019-02-19
This Plugin Published: 2019-05-30
Last Modification Time: 2019-06-04
Plugin Version: 1.3
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: wordpress_detect.nasl
Required KB Items [?]: installed_sw/WordPress, Settings/ParanoidReport, www/PHP

Vulnerability Information


Severity: Medium
Vulnerability Published: 2019-02-19
Patch Published: 2019-03-13
CVE [?]: CVE-2019-8943
CPE [?]: cpe:/a:wordpress:wordpress

Synopsis

A PHP application running on the remote web server is affected by a directory traversal vulnerability.

Description

According to its self-reported version number, the WordPress application running on the remote web server is prior to 5.0.4. It is, therefore, affected by a directory traversal vulnerability in its wp_crop_image() component. An authenticated, remote attacker can exploit this, by sending a URI that contains directory traversal characters, to disclose the contents of files located outside of the server's restricted path.

Solution

Upgrade to WordPress version 5.0.4 or later.

Public Exploits


Target Network Port(s): 80, 443
Target Asset(s): Services/www
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the WordPress < 5.0.4 Directory Traversal Vulnerability vulnerability:

  1. Metasploit: exploit/multi/http/wp_crop_rce
    [WordPress Crop-image Shell Upload]
  2. Exploit-DB: exploits/php/remote/46662.rb
    [EDB-46662: WordPress Core 5.0.0 - Crop-image Shell Upload (Metasploit)]
  3. GitHub: https://github.com/El-Palomo/DerpNStink
    [CVE-2019-8943]
  4. GitHub: https://github.com/SexyBeast233/SecBooks
    [CVE-2019-8943]
  5. GitHub: https://github.com/brianwrf/WordPress_4.9.8_RCE_POC
    [CVE-2019-8943]
  6. GitHub: https://github.com/scannells/exploits
    [CVE-2019-8943]
  7. GitHub: https://github.com/v0lck3r/CVE-2019-8943
    [CVE-2019-8943: Exploit of CVE-2019-8942 and CVE-2019-8943]
  8. GitHub: https://github.com/synod2/WP_CROP_RCE
    [CVE-2019-8943: cve-2019-8942, cve-2019-8943]

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS Score Source [?]: CVE-2019-8943
CVSS V2 Vector: AV:N/AC:L/Au:S/C:N/I:P/A:N/E:F/RL:OF/RC:C
CVSS Base Score:4.0 (Medium)
Impact Subscore:2.9
Exploitability Subscore:8.0
CVSS Temporal Score:3.3 (Low)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:3.3 (Low)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N/E:F/RL:O/RC:C
CVSS Base Score:6.5 (Medium)
Impact Subscore:3.6
Exploitability Subscore:2.8
CVSS Temporal Score:6.0 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.0 (Medium)

Go back to menu.

Plugin Source


This is the wordpress_5_0_4.nasl nessus plugin source code. This script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof.

#
# (C) Tenable Network Security, Inc.
#
include('compat.inc');

if (description)
{
  script_id(125596);
  script_version("1.3");
  script_cvs_date("Date: 2019/06/04  9:45:00");

  script_cve_id("CVE-2019-8943");
  script_bugtraq_id(107089);

  script_name(english:"WordPress < 5.0.4 Directory Traversal Vulnerability");
  script_summary(english:"Checks the version of WordPress.");

  script_set_attribute(attribute:"synopsis", value:
"A PHP application running on the remote web server is affected by a directory traversal vulnerability.");
  script_set_attribute(attribute:"description", value:
"According to its self-reported version number, the WordPress application running on the remote web server is prior to 
5.0.4. It is, therefore, affected by a directory traversal vulnerability in its wp_crop_image() component. 
An authenticated, remote attacker can exploit this, by sending a URI that contains directory traversal characters, to 
disclose the contents of files located outside of the server's restricted path.");
  # https://wordpress.org/support/wordpress-version/version-5-0-4
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?70233294");
  script_set_attribute(attribute:"solution", value:"Upgrade to WordPress version 5.0.4 or later.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:S/C:N/I:P/A:N");
  script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:F/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2019-8943");
  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'WordPress Crop-image Shell Upload');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2019/02/19");
  script_set_attribute(attribute:"patch_publication_date", value:"2019/03/13");
  script_set_attribute(attribute:"plugin_publication_date", value:"2019/05/30");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:wordpress:wordpress");
  script_set_attribute(attribute:"potential_vulnerability", value:"true");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"CGI abuses");

  script_copyright(english:"This script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("wordpress_detect.nasl");
  script_require_keys("www/PHP", "installed_sw/WordPress", "Settings/ParanoidReport");
  script_require_ports("Services/www", 80, 443);

  exit(0);
}

include('vcf.inc');
include('http.inc');

if (report_paranoia < 2) audit(AUDIT_PARANOID);

port = get_http_port(default:80, php:TRUE);
app_info = vcf::get_app_info(app:'WordPress', port:port, webapp:TRUE);

constraints = [{'fixed_version':'5.0.4' }];
vcf::check_version_and_report(app_info:app_info, constraints:constraints, severity:SECURITY_WARNING);

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/wordpress_5_0_4.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\wordpress_5_0_4.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/wordpress_5_0_4.nasl

Go back to menu.

How to Run


Here is how to run the WordPress < 5.0.4 Directory Traversal Vulnerability as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select CGI abuses plugin family.
  6. On the right side table select WordPress < 5.0.4 Directory Traversal Vulnerability plugin ID 125596.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl wordpress_5_0_4.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a wordpress_5_0_4.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - wordpress_5_0_4.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state wordpress_5_0_4.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 100028 - WordPress 2.3.0 - 4.8.3 Unauthorized Password Reset
  • 100298 - WordPress < 4.7.5 Multiple Vulnerabilities
  • 103358 - WordPress < 4.8.2 Multiple Vulnerabilities
  • 104356 - WordPress < 4.8.3 Multiple Vulnerabilities
  • 105004 - WordPress < 4.9.1 Multiple Vulnerabilities
  • 105372 - WP Symposium Plugin Arbitrary File Upload
  • 106304 - WordPress < 4.9.2 MediaElement.js Flash Fallback XSS
  • 106376 - WordPress < 2.8.3 'wp-admin' Multiple Security Bypass Vulnerabilities
  • 109034 - WordPress < 4.9.5 Multiple Vulnerabilities
  • 110482 - UserPro Plugin for WordPress up_auto_log Parameter Remote Authentication Bypass
  • 111229 - WordPress < 4.9.7 Arbitrary File Deletion Vulnerability
  • 118935 - WordPress Plugin 'WP GDPR Compliance' < 1.4.3 Privilege Escalation
  • 119615 - WordPress < 4.9.9 / 5.x < 5.0.1 Multiple Vulnerabilities
  • 122823 - WordPress < 5.1.1 Multiple Vulnerabilities
  • 123643 - WP Google Maps for WordPress < 7.11.17 Unauthenticated SQL Injection (CVE-2019-10692)
  • 125597 - WordPress < 4.9.9 Remote Code Execution Vulnerabilities
  • 128554 - WordPress <= 3.6.1 / 3.7.x < 3.7.30 / 3.8.x < 3.8.30 / 3.9.x < 3.9.28 / 4.0.x < 4.0.27 / 4.1.x < 4.1.27 / 4.2.x < 4.2.24 / 4.3.x < 4.3.20 / 4.4.x < 4.4.19 / 4.5.x < 4.5.18 / 4.6.x < 4.6.15 / 4.7.x < 4.7.14 / 4.8.x < 4.8.10 / 4.9.x < 4.9.11 / 5.0.x < 5.0.6 / 5.1.x < 5.1.2 / 5.2.x < 5.2.3 Multiple Vulnerabilities
  • 129849 - WordPress < 5.2.4 Multiple Vulnerabilities
  • 133846 - WordPress Plugin 'Duplicator' < 1.3.28 Unauthenticated Arbitrary File Download
  • 136191 - WordPress Plugin 'LearnPress' < 3.2.6.8 Multiple Vulnerabilities
  • 137627 - WordPress < 5.4.2
  • 139872 - WordPress Plugin 'SRS Simple Hits Counter' Information Disclosure
  • 140193 - WordPress Plugin 'Duplicator' Directory Traversal (CVE-2020-11738)
  • 140211 - WordPress Plugin 'File Manager' 6.x < 6.9 Remote Code Execution
  • 142420 - WordPress < 5.5.2 Multiple Vulnerabilities
  • 148844 - WordPress 5.7 < 5.7.1 / 5.6 < 5.6.3 / 5.5 < 5.5.4 / 5.4 < 5.4.5 / 5.3 < 5.3.7 / 5.2 < 5.2.10 / 5.1 < 5.1.9 / 5.0 < 5.0.12 / 4.9 < 4.9.17 / 4.8 < 4.8.16 / 4.7 < 4.7.20
  • 151025 - WordPress Plugin 'SRS Simple Hits Counter' Information Disclosure (direct check)
  • 153173 - WordPress 5.8 < 5.8.1 / 5.7 < 5.7.3 / 5.6 < 5.6.5 / 5.5 < 5.5.6 / 5.4 < 5.4.7 / 5.2 < 5.2.12
  • 156546 - WordPress 5.8 < 5.8.3 / 5.7 < 5.7.5 / 5.6 < 5.6.7 / 5.5 < 5.5.8 / 5.4 < 5.4.9 / 5.3 < 5.3.11 / 5.2 < 5.2.14 / 5.1 < 5.1.12 / 5.0 < 5.0.15 / 4.9 < 4.9.19 / 4.8 < 4.8.18 / 4.7 < 4.7.22 / 4.6 < 4.6.22 / 4.5 < 4.5.25 / 4.4 < 4.4.26 / 4.3 < 4.3.27 / 4.2 < 4.2.31 / 4.1 < 4.1.34 / 4.0 < 4.0.34 / 3.9 < 3.9.35 / 3.8 < 3.8.37 / 3.7 < 3.7.37
  • 159570 - WordPress Plugin 'Social Warfare' < 3.5.3 XSS
  • 18601 - WordPress < 1.5.1.3 XMLRPC SQL Injection
  • 19414 - WordPress Cookie 'cache_lastpostdate' Parameter PHP Code Injection

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file wordpress_5_0_4.nasl version 1.3. For more plugins, visit the Nessus Plugin Library.

Go back to menu.