SugarCRM (WorkFlow module) PHP Code Injection Vulnerability
User input in the base_module POST parameter to the WorkFlow module's Save action is not sanitised before being written into a PHP file, allowing an authenticated administrator to inject and execute arbitrary PHP code.
karmainsecurity.com
Published on karmainsecurity.com
User input passed through the $POST[‘basemodule’] parameter to the “Save” action of the WorkFlow module is not properly sanitized before being used to write data into the workflow.php file. 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 application writes user-supplied input into a PHP file without escaping or validating it, so injected PHP code becomes part of the executable file.
Impact
An attacker with admin privileges could execute arbitrary PHP code on the server, but the report notes that admin privileges are required.
What the attacker needed
Admin privileges
The fix
The vendor fixed it by releasing updated versions; users should update to [redacted] or 7.11.0.0.
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 a value from a form and writes it directly into a PHP source file without cleaning it. Because PHP files are executed by the server, an attacker who can control that value can add their own PHP commands, which then run on the server. This particular flaw requires the attacker to already be an administrator.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.