Fortinet FortiWeb gui_upload_compress_act Command Injection Remote Code Execution Vulnerability
The gui_upload_compress_act function in Fortinet FortiWeb fails to properly validate a user-supplied string before passing it to a system call, allowing command injection. An authenticated attacker could combine this with other flaws to run arbitrary code as root.
Originally disclosed on Zero Day Initiative
This vulnerability allows remote attackers to execute arbitrary code on affected installations of Fortinet FortiWeb. Authentication is required to exploit this vulnerability.
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 report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the function builds a shell command from unvalidated user input, so injected shell metacharacters are executed.
Impact
An authenticated attacker could execute arbitrary code as root, though the text says this requires chaining with other vulnerabilities.
What the attacker needed
Authentication to the appliance; chaining with other vulnerabilities
The fix
Fortinet issued an update to correct the vulnerability.
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 report has not been written yet. The Original tab links to the source.
Some programs run operating-system commands on the server to do tasks like compressing files. If they build that command from text a user supplies without checking it, the user can sneak in extra commands. Here an authenticated user could make the appliance run their own commands with the highest privileges.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.