X2Engine <= 4.1.7 (SiteController.php) PHP Object Injection Vulnerability
The actionSendErrorReport() method takes a POST parameter and passes it to PHP's unserialize() function without sanitising it. An attacker could send a crafted serialised object to trigger PHP object injection, which may lead to further exploitation depending on available gadget chains.
karmainsecurity.com
Published on karmainsecurity.com
The vulnerable code is located in the actionSendErrorReport() method defined in /protected/controllers/SiteController.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
The application passes user-controlled POST data directly into unserialize() without validating or restricting the input.
What the attacker needed
Access to the error report endpoint; a crafted serialised payload
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 stored object back into a live object using a function called unserialize(). If a website feeds user-supplied text into that function, an attacker can supply their own object, and the site may run code attached to it. Here the report field of a form is decoded and unserialised with no checks.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.