CVE-2026-33397

CVE-2026-33397 is a medium-severity open redirect vulnerability in @angular/ssr (npm), affecting versions >= 22.0.0-next.0, < 22.0.0-next.2. It is fixed in 22.0.0-next.2, 21.2.3, 20.3.21.

Summary

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 Location header 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).

Workarounds

Until the patch is applied, developers should sanitize the X-Forwarded-Prefix header in their server.ts before the Angular engine processes the request:

app.use((req, res, next) => {
  const prefix = req.headers['x-forwarded-prefix'];
  if (typeof prefix === 'string') {
    // Sanitize by removing all leading forward and backward slashes
    req.headers['x-forwarded-prefix'] = prefix.trim().replace(/^[/\\]+/, '/');
  }
  next();
});

References

Impact

This vulnerability allows attackers to conduct large-scale phishing and SEO hijacking:

  • Scale: A single request can poison a high-traffic route, impacting all users until the cache expires.
  • SEO Poisoning: Search engine crawlers may follow and index these malicious redirects, causing the legitimate site to be delisted or associated with malicious domains.
  • Trust: Because the initial URL belongs to the trusted domain, users and security tools are less likely to flag the redirect as malicious.

Untrusted input controls a URL used for redirection, which can forward users to attacker-controlled sites. Typical impact: phishing and credential harvesting via a trusted domain.

CVE-2026-33397 has a CVSS score of 6.1 (Medium). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (22.0.0-next.2, 21.2.3, 20.3.21); upgrading removes the vulnerable code path.

Affected versions

@angular/ssr (>= 22.0.0-next.0, < 22.0.0-next.2) @angular/ssr (>= 21.0.0-next.0, < 21.2.3) @angular/ssr (>= 20.0.0-next.0, < 20.3.21)

Security releases

@angular/ssr → 22.0.0-next.2 (npm) @angular/ssr → 21.2.3 (npm) @angular/ssr → 20.3.21 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

  • 22.0.0-next.2
  • 21.2.3
  • 20.3.21

Frequently Asked Questions

  1. What is CVE-2026-33397? CVE-2026-33397 is a medium-severity open redirect vulnerability in @angular/ssr (npm), affecting versions >= 22.0.0-next.0, < 22.0.0-next.2. It is fixed in 22.0.0-next.2, 21.2.3, 20.3.21. Untrusted input controls a URL used for redirection, which can forward users to attacker-controlled sites.
  2. How severe is CVE-2026-33397? CVE-2026-33397 has a CVSS score of 6.1 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of @angular/ssr are affected by CVE-2026-33397? @angular/ssr (npm) versions >= 22.0.0-next.0, < 22.0.0-next.2 is affected.
  4. Is there a fix for CVE-2026-33397? Yes. CVE-2026-33397 is fixed in 22.0.0-next.2, 21.2.3, 20.3.21. Upgrade to this version or later.
  5. Is CVE-2026-33397 exploitable, and should I be worried? Whether CVE-2026-33397 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-33397 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-33397?
    • Upgrade @angular/ssr to 22.0.0-next.2 or later
    • Upgrade @angular/ssr to 21.2.3 or later
    • Upgrade @angular/ssr to 20.3.21 or later

Other vulnerabilities in @angular/ssr

CVE-2026-44437CVE-2026-27739CVE-2026-27738CVE-2025-62427CVE-2025-59052

Stop the waste.
Protect your environment with Kodem.