SugarCRM <= 6.3.1 Multiple PHP Object Injection Vulnerabilities
SugarCRM fails to sanitise user input before passing it to an unserialize() call, allowing an attacker to supply a crafted serialized object. This can create a cache file containing arbitrary PHP code by abusing the __destruct() method of the SugarTheme class.
karmainsecurity.com
Published on karmainsecurity.com
SugarCRM contains a flaw that is triggered when certain scripts fail to properly sanitize user-supplied input before being used in an unserialize() call. With a specially crafted serialized object an attacker might be able to create a cache file containing arbitrary PHP code abusing the destruct() method of the…
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 passes unsanitised user input directly to PHP's unserialize() function, and the SugarTheme class's __destruct() method can be abused to write arbitrary PHP code to a cache file.
Impact
An attacker might be able to create a cache file containing arbitrary PHP code, potentially leading to remote code execution.
What the attacker needed
Access to vulnerable scripts
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.
When a program turns stored data back into an object, it can be tricked if the data is not checked. Here, an attacker can send a specially made piece of data that, when turned back into an object, causes the program to write a file containing harmful code. That file can then be run to take over 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.