module

vBulletin replaceAdTemplate Remote Code Execution

Disclosed
May 23, 2025
Created
Jun 29, 2025

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 conditional that evaluates attacker-supplied PHP using the
"system"($_POST[]) construct. The malicious template is then executed via
a second unauthenticated request to ajax/render/ad_.

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.

Authors

Egidio Romano (EgiX)
Valentin Lobstein

Platform

Linux,Unix,Windows

Architectures

cmd

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_rce
msf exploit(vbulletin_replace_ad_template_rce) > show targets
...targets...
msf exploit(vbulletin_replace_ad_template_rce) > set TARGET < target-id >
msf exploit(vbulletin_replace_ad_template_rce) > show options
...show and set options...
msf exploit(vbulletin_replace_ad_template_rce) > exploit

Title
NEW

Explore Exposure Command

Confidently identify and prioritize exposures from endpoint to cloud with full attack surface visibility and threat-aware risk context.