FortiWeb cookie protection by pass and session hijacking vulnerability
Summary
An improper access control vulnerability in FortiWeb's Signed Security mode may allow an attacker to disable the cookie tampering protection offered by FortiWeb (to sites FortiWeb protects), via deleting FortiWeb's session cookie.
Affected Products
FortiWeb all versions below 6.1.0, starting from 5.6.0.
Solutions
Upgrade to FortiWeb 6.1.0 and ensure the "Allow Suspicious Cookies" value is set to "Never" or "Custom" (default value) when "Security Mode" is set to "Signed".
Workarounds:
A simple workaround with no downside is available for impacted versions, as described below:
Use "Encrypted" security mode instead of "Signed" security mode. Cookies set by protected web-sites will then be encrypted by FortiWeb before passing them on to the end-users. Attackers being unaware of the encryption key, cookie tampering will remain impossible, and removing FortiWeb's own session cookie will not enable protection bypass.
From the FortiWeb GUI, choose "Encrypted" Security Mode under Web Protection > Cookie Security.
From the FortiWeb CLI, set security-mode to "encrypted" instead "signed":
config waf cookie-security
edit [cookie-security_name]
set security-mode {no | encrypted* | signed}
next
end
Further Reference:
http://help.fortinet.com/fweb/580/Content/FortiWeb/fortiweb-admin/cookie_security.htm
Revision History:
2018-03-06 Initial Version
2019-04-01 Formal solution provided in FortiWeb 6.1.0