Tales of SugarCRM Security Horrors
SugarCRM used the PHP unserialize() function on user-supplied input, and its attempted fixes (a __wakeup method that nulls properties and a regex-based input filter) could be bypassed, allowing authenticated and unauthenticated attackers to inject arbitrary PHP objects and potentially achieve remote code execution.
Published on karmainsecurity.com
SugarCRM is a pretty popular Customer Relationship Management (CRM) application written in PHP code. It was born in 2004 as an open source project hosted on SourceForge, a development repository for free software.
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 continued to call unserialize() on user-controlled input, and the mitigations (a __wakeup method and a regex filter) were incomplete and bypassable.
What the attacker needed
SugarCRM instance; for some vectors: valid account; for REST vector: no account needed
The fix
The text says the issues were not fully fixed in the Community Edition at the time of writing, and recommends switching to JSON encoding/decoding instead of unserialize().
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 has a function called unserialize() that turns stored text back into program objects. If a website passes user input to that function, an attacker can craft text that creates objects the developer never intended, which can lead to running their own code. SugarCRM tried to block this but the blocks were incomplete.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.