**CVE-2026-137330** is an unauthenticated PHP object injection bug in self-hosted vBulletin (before 6.2.2 PL1) that leads to remote code execution. This repository contains a Python proof of concept. Use it only against systems you own or are authorized to test.
1. `POST /ajax/render/contententry_editor` renders the content editor for any visitor, so guest input reaches the template layer.
2. `conversation[rawtext]` is set to `[ATTACH=CONFIG]n1[/ATTACH]`, which makes the BBCode parser look up attachment `n1`. The matching `settings` value comes from `conversation[attachments][0][settings]`.
3. `bbcode::parseWysiwyg()` in `includes/vb5/template/bbcode.php` calls `unserialize()` on that value without `allowed_classes`. That is the root cause.
4. The payload uses Guzzle classes as a gadget chain. On destruction it reaches `PumpStream::__toString()` and `HandlerStack::resolve()`, which applies `shell_exec` → `base64_encode` → `constant`.
`constant()` throws `Undefined constant ""`. vBulletin catches the exception and returns it in the JSON response, so the command output comes back in-band:
["unexpected_error", "Undefined constant \"dWlkPTMzKHd3dy1kYXRhKSBnaWQ9...\""]
The command is base64-encoded before it goes into the payload and decoded on the target with `echo | base64 -d | sh`. This keeps the serialized string free of spaces, which would otherwise change the `s:N` byte count and break `unserialize()` on targets that normalize whitespace in the POST body. The wrapper starts with `exec 2>&1` so stderr is returned too.
- **Research write-up (Duarte Santos)**: [vBulletin2Shell](
- **VulnCheck advisory (CNA)**: [vBulletin2Shell — Unauthenticated RCE via PHP Object Injection](
- **CVE record**: [CVE-2026-137330](
- **NVD**: [CVE-2026-137330](
- **Vendor patch notice**: [Security Patch Released for Self-Hosted vBulletin 6.2.4, 6.2.3 and 6.2.2](
- **The Hacker News**: [Critical vBulletin Flaw Gets Public Exploit for Unauthenticated Remote Code Execution](
- **watchTowr Intel**: [vBulletin2Shell FAQ](
- **CWE-502**: [Deserialization of Untrusted Data](
