Web Browser XSS Protection Not Enabled

ID

web_browser_xss_protection_not_enabled

Severity

info

Kind

Cross-Site Scripting

CWE

N/A

Description

Web Browser XSS Protection is not enabled, or is disabled by the configuration of the 'X-XSS-Protection' HTTP response header on the web server

Deprecated: 2020-02-11

No longer widely supported by browsers.

Rationale

This finding is informational and has minimal security impact as major browsers have deprecated the X-XSS-Protection header since 2020. The header was designed to enable browser-based XSS filtering, but implementation flaws created new vulnerabilities and it has been superseded by Content Security Policy. While its absence or disablement was once concerning, modern security practices rely on CSP and proper input validation rather than browser XSS filters. This alert serves mainly as a legacy detection for outdated security configurations.

Remediation

Since X-XSS-Protection is deprecated and no longer supported by modern browsers, focus on implementing a robust Content Security Policy (CSP) instead. Use CSP headers to restrict script sources and prevent inline script execution. Ensure proper input validation and output encoding to prevent XSS vulnerabilities at the application level. If compatibility with very old browsers is required, you may set X-XSS-Protection: 1; mode=block, but prioritize CSP as the primary defense.

References

  • No references available.