Skip to content
RCE Write-up Advanced

Exploiting vBulletin: “A Tale of a Patch Fail”

The patch for CVE-2019-16759 in vBulletin was incomplete because it only blocked the widget_php template from being the final route and filtered the widgetConfig variable, but another template (widget_tabbedcontainer_tab_panel) allowed a user-controlled child template to be loaded with a config that was renamed to widgetConfig, bypassing the filter. An attacker could send a crafted request to execute arbitrary PHP code on the server.

blog.exploitee.rs

Published on blog.exploitee.rs

On September 23, 2019 an undisclosed researcher released a bug which allowed for PHP remote code execution in vBulletin 5.0 through 5.4. This bug (CVE-2019-16759) was labeled as a ‘bugdoor’ because of its simplicity by a popular vulnerability broker and was marked with a CVSS 3.x score of 9.8 giving it a critical…

The author, on blog.exploitee.rs

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the patch only checked the top-level template name and filtered a specific variable, but did not account for nested templates where a user-controlled child template could be loaded with a config array that was then passed as widgetConfig, bypassing the filter.

Impact

An attacker could execute arbitrary PHP code on the server, leading to full compromise.

What the attacker needed

VBulletin 5.x with the patch for CVE-2019-16759 applied; No authentication required

The fix

The patch should have prevented any user-controlled template from being loaded or ensured that the widgetConfig filter cannot be bypassed via nested templates.

How it was found

  1. Send a request to the ajax/render endpoint with the widget_tabbedcontainer_tab_panel template.
  2. Include a subWidgets array with a template set to widget_php and a config containing PHP code.
  3. The template loads the child widget_php template and passes the config as widgetConfig, which is then evaluated as PHP.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

vBulletin is forum software written in PHP. A previous bug let attackers run PHP code on the server, and the fix tried to block that specific way. But the fix missed another template that could be tricked into loading the dangerous PHP widget, so attackers could still run code.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.