Description
This module exploits a design flaw in vBulletin's AJAX API handler and template rendering system, present in versions 5.0.0 through 6.0.3. The vulnerability allows unauthenticated attackers to invoke protected controller methods via the ajax/api/ad/replaceAdTemplate endpoint, due to improper use of PHP's Reflection API in combination with changes in PHP 8.1+.
Specifically, it targets the vB_Api_Ad::replaceAdTemplate() method to inject a template containing a <vb:if> conditional that evaluates attacker-supplied PHP using the "system"($_POST[<param>]) construct. The malicious template is then executed via a second unauthenticated request to ajax/render/ad_<location>.
Successful exploitation results in arbitrary command execution as the webserver user, without authentication. This module supports payloads for PHP, Linux, and Windows.
Tested against vBulletin 5.1.0, 5.7.5, 6.0.1, and 6.0.3 running on PHP 8.1.
Module options
To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':
msf > use exploit/multi/http/vbulletin/replace_ad_template_rcemsf undefined(replace_ad_template_rce) > show actions ...actions...msf undefined(replace_ad_template_rce) > set ACTION < action-name >msf undefined(replace_ad_template_rce) > show options ...show and set options...msf undefined(replace_ad_template_rce) > runPrioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub