SugarCRM (Web Logic Hooks module) PHP Code Injection Vulnerability
The Web Logic Hooks module fails to sanitise the trigger_event parameter before writing it 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 “triggerevent” parameter is not properly sanitized before being used to save PHP code into the logichooks.php file through the Web Logic Hooks module. 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 missing input validation and sanitisation on the trigger_event parameter before it is written into a PHP source file.
Impact
An attacker with administrator privileges could inject and execute arbitrary PHP code on the server.
What the attacker needed
Administrator privileges
The fix
It should be fixed by updating to versions [redacted], 8.0.2, or 8.2.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.
A PHP file is a script that runs on the web server. The application let an administrator type a value that was saved directly into such a script without cleaning it, so the administrator could add their own commands that the server would then run.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.