Invision Power Board <= 3.3.4 (core.php) PHP Object Injection Vulnerability
A cookie value was passed to PHP's unserialize() without sanitisation, allowing a crafted serialised object to trigger the __destruct() method of the dbMain class and write a file containing arbitrary PHP code. A remote attacker could therefore create a PHP file with their own code on the server.
karmainsecurity.com
Published on karmainsecurity.com
Invision Power Board contains a flaw related to the IPSCookie::get() method defined in the admin/sources/base/core.php script. User input passed through cookies is not properly sanitized before being used in a call to the unserialize() function.
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
Impact
A remote attacker might be able to create a file containing arbitrary PHP code, which could lead to code execution on the server.
What the attacker needed
Ability to send a crafted cookie; vulnerable IPB version
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 with a function called unserialize(). If a website runs that function on data a visitor controls, the visitor can choose which object is rebuilt and which of its automatic cleanup methods run. Here the cleanup method of a database class could write a file, so the attacker could plant their own PHP code on the server.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.