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.
Exploit database
Vulnerability
CVE-2025-48828
Vulnerability details
- Score
- 9.0
- Severity
- critical
CVSS 3.1 · mitre
Vector string
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:HDescription
Certain vBulletin versions might allow attackers to execute arbitrary PHP code by abusing Template Conditionals in the template engine. By crafting template code in an alternative PHP function invocation syntax, such as the "var_dump"("test") syntax, attackers can bypass security checks and execute arbitrary PHP code, as exploited in the wild in May 2025.
CVE ProgramExploit source choices
1 sourcevBulletin replaceAdTemplate Remote Code Execution
2025-05-23vbulletin_replace_ad_template_rce.rb