FortiWeb's cookie tampering protection can be bypassed by erasing the FortiWeb session cookie


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.


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".


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}

Further Reference:

style="font-size: 18px;">Revision History:
2018-03-06 Initial Version
2019-04-01 Formal solution provided in FortiWeb 6.1.0


Fortinet is pleased to thank independent researcher "Yavuz Özdemir" from 4S information Technology for reporting this vulnerability under responsible disclosure.