This vulnerability occurs when an application fails to properly filter or escape invalid characters within web identifiers like HTML tag names or URI schemes, allowing malicious sequences to pass through.
Modern web browsers often interpret malformed identifiers in unexpected ways. For instance, a browser might silently strip out null bytes or other invalid characters, reconstructing a dangerous payload that the developer's filters missed. This creates a gap where your security checks see a harmless string, but the browser executes it as active code. Attackers exploit this by embedding these invalid sequences—like null bytes or alternative encodings—within identifiers such as URI schemes. A common bypass involves encoding "javascript:" as something like `java%00script:`, which might bypass a simple blacklist filter but still render as executable JavaScript in the browser, leading to cross-site scripting (XSS) or other client-side attacks.
Impact: Read Application DataExecute Unauthorized Code or Commands
Strategy: Output Encoding
Strategy: Attack Surface Reduction
Effectiveness: Defense in Depth