SugarCRM (addLabels) PHP Code Injection Vulnerability
User input in the key values of the labels_ parameters was not properly sanitised before being saved as PHP code in the ParserLabel::addLabels() method. An attacker with admin privileges could inject and execute arbitrary PHP code.
karmainsecurity.com
Published on karmainsecurity.com
User input passed through key values of the “labels" parameters is not properly sanitized before being used to save PHP code within the ParserLabel::addLabels() method when saving labels through the Module Builder. This can be exploited to inject and execute arbitrary PHP code.
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 labels_ parameter keys are concatenated into generated PHP source without escaping or validation, so attacker-controlled text becomes executable code.
Impact
An attacker with admin privileges could inject and execute arbitrary PHP code on the server.
What the attacker needed
Admin privileges
The fix
It should be fixed by updating to the listed patched versions.
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.
The application takes text from a form and writes it into a PHP source file without cleaning it first. Because the text becomes part of the program, someone who can reach that form can add their own PHP instructions, which the server will later run. This particular form is only available to administrators.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.