SugarCRM (SaveDropDown) PHP Code Injection Vulnerability
The Module Builder did not properly sanitise user input passed through key values of the list_value JSON parameter before using it to save PHP code when adding or saving dropdowns. 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 “listvalue” JSON parameter is not properly sanitized before being used to save PHP code when adding/saving dropdowns 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 dropdown-saving routine wrote user-controlled key values into a PHP source file without escaping them, so injected code became executable PHP.
Impact
An attacker with admin privileges could inject and execute arbitrary PHP code on the server, though the exploit is limited to administrators.
What the attacker needed
Admin privileges on the SugarCRM instance
The fix
It should be fixed by updating to the listed patched versions, which the text presents as the solution.
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.
A dropdown is a menu of choices in a web application. The Module Builder is a feature that lets administrators create and edit those menus, and it writes the choices into a PHP file on the server. Because the input was not cleaned properly, someone could slip PHP code into a menu entry so the server runs it as a program.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.