CVE-2026-33397: Protocol-Relative URL Injection via Single Backslash Bypass in Angular SSR
An Open Redirect vulnerability exists in @angular/ssr due to an incomplete fix for CVE-2026-27738. While the original fix successfully blocked multiple leading slashes (e.g., ///), the internal validation logic fails to account for a single backslash (\) bypass.
When an Angular SSR application is deployed behind a proxy that passes the X-Forwarded-Prefix header:
- An attacker provides a value starting with a single backslash (e.g.,
\evil.com). - The internal validation failed to flag the single backslash as invalid.
- The application prepends a leading forward slash, resulting in a
Locationheader containing/\evil.com. - Modern browsers interpret the
/\sequence as//, treating it as a protocol-relative URL and redirecting the user to the attacker-controlled domain.
Furthermore, the response lacks the Vary: X-Forwarded-Prefix header, allowing the malicious redirect to be stored in intermediate caches (Web Cache Poisoning).
References
Code Behaviors & Features
Detect and mitigate CVE-2026-33397 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →