Incomplete Denylist to Cross-Site Scripting

Draft Compound
Structure: Chain
Description

This vulnerability occurs when an application relies on an incomplete denylist to block cross-site scripting (XSS) attacks, leaving the door open for attackers to craft payloads that bypass the filter.

Extended Description

Preventing XSS is trickier than it seems because modern web browsers and HTML parsers handle content in many different ways. An incomplete denylist, which only blocks a known set of dangerous patterns, cannot account for all the possible encoding tricks, HTML variations, and browser quirks that attackers can exploit. This creates a false sense of security. Attackers frequently use resources like the 'XSS Cheat Sheet' to find bypass techniques that evade common denylists. To effectively prevent XSS, developers should move away from denylists and instead adopt positive security models like context-aware output encoding and strict Content Security Policies (CSP).

Common Consequences 1
Scope: ConfidentialityIntegrityAvailability

Impact: Execute Unauthorized Code or Commands

Observed Examples 3
CVE-2007-5727Denylist only removes <SCRIPT> tag.
CVE-2006-3617Denylist only removes <SCRIPT> tag.
CVE-2006-4308Denylist only checks "javascript:" tag
References 1
XSS (Cross Site Scripting) Cheat Sheet
RSnake
ID: REF-714