-
Notifications
You must be signed in to change notification settings - Fork 53
TWA 0210
Ulrich Berntien edited this page Aug 10, 2020
·
1 revision
"X-XSS-Protection is '0'; XSS filtering disabled"
The server sends "X-XSS-Protection 0" to the web browser. This disables the XSS (cross-site scripting) filtering in the web browsers. (If the web browser supports XSS filtering and the XSS filtering is enabled by default.)
The X-XSS-Protection should only be disabled in the rare case if a web application can't work with X-XSS-Protection.
Set the X-XSS-Protection to 1; mode=block
in the web server configuration or in the web application (e.g. PHP scripts).
The XSS protection by this flag is weak because a lot of modern browsers (e.g. Chrome 78, Edge 17, Firefox 79) don't support this feature. The Content-Security-Policy could be used additionaly.
- OWAPS: Cross Site Scripting
- MDN web docs: X-XSS-Protection
- See also MDN web docs: Content-Security-Policy as another guard against XSS.