PSIRT Advisory
FortiOS local privilege escalation via malicious use of USB storage devices
Summary
An admin user with super_admin privileges can execute an arbitrary binary contained on an USB drive plugged to a FortiGate, via linking the aforementioned binary to a command that is allowed to be run by the fnsysctl CLI command.
Impact
Local Privilege Escalation
Affected Products
FortiOS 5.6.0 to 5.6.2
FortiOS 5.4.0 to 5.4.8
FortiOS 5.2 and below.
Solutions
Upgrade to 5.6.3 or 5.4.9 or newer versions.
Workarounds
* Switching to FIPS mode will ban the fnsysctl CLI command hence preventing the attack.
* Only the super_admin profile has the privileges required to perform the attack, so avoid assigning it to administrators.
Acknowledgement
Fortinet is pleased to thank Shaanan Cohney of University of Pennsylvania for reporting this vulnerability under responsible disclosure.