Vanilla Forums <= 2.0.18.5 (class.utilitycontroller.php) PHP Object Injection Vulnerability
The utility controller unserialises a user-supplied POST parameter without sufficient validation, allowing PHP object injection. An attacker who can supply a valid transient key could pass crafted serialised data and potentially trigger magic methods on loaded classes.
karmainsecurity.com
Published on karmainsecurity.com
The vulnerable code is located in /applications/dashboard/controllers/class.utilitycontroller.php:
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application passed a POST parameter directly into Gdn_Format::Unserialize without restricting which classes could be instantiated.
What the attacker needed
Valid transient key; ability to send POST requests
How it was found
- Obtain a valid transient key for the session.
- Send a POST request to the utility controller with the Messages parameter set to serialised data.
- The server unserialises the value and saves it.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
PHP can turn a block of text into a live object using a function called unserialize. If a website runs that function on data a user sends, the user can choose which class gets built and which of its automatic methods run, which can lead to code execution or data theft. Here the site took a form field and unserialised it after only checking a session token.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.