Bug ID 754109: ASM/Bot-Defense/DoSL7 content-security-policy header modification violates Content Security Policy directive

Last Modified: Jul 12, 2023

Affected Product(s):
BIG-IP ASM(all modules)

Known Affected Versions:
13.1.0,,,,,,,,, 13.1.1,,,,, 13.1.3,,,, 14.0.0,,,,,, 14.0.1,, 14.1.0,,,,,, 14.1.2,,

Fixed In:

Opened: Dec 26, 2018

Severity: 2-Critical


When the backend server sends a content-security-policy header where source-src and default-src directives are missing, ASM will modify the header when it does its own JavaScript injection, which might cause a csp policy violation for inline JavaScript code.


Inline JavaScript does not run. The Browser reports a content-security-policy violation.


-- ASM provisioned. -- ASM or Bot-Defense/DoS attached on a virtual server. -- ASM or Bot/Dos does inline injections, like CSRF/CSHUI.


You can use either of the following workarounds: -- Disable csp in ASM by running the following commands: /usr/share/ts/bin/add_del_internal add csp_enabled 0 bigstart restart asm -- Disable csp in Bot/DoS using an iRule: when HTTP_REQUEST { set csp 0 } when HTTP_RESPONSE { if { [HTTP::header exists Content-Security-Policy] } { set csp "[HTTP::header values Content-Security-Policy]" } } when HTTP_RESPONSE_RELEASE { if { $csp != 0 } { HTTP::header replace Content-Security-Policy $csp } set csp 0 }

Fix Information

ASM/Bot/DoSL7 no longer modifies the csp header when both source-src and default-src directives are missing.

Behavior Change

Guides & references

K10134038: F5 Bug Tracker Filter Names and Tips