Summary
An Open Redirect vulnerability exists in the internal URL processing logic in Angular SSR. The logic normalizes URL segments by stripping leading slashes; however, it only removes a single leading slash.
When an Angular SSR application is deployed behind a proxy that passes the X-Forwarded-Prefix header, an attacker can provide a value starting with three slashes (e.g., ///evil.com).
- The application processes a redirect (e.g., from a router
redirectToor i18n locale switch). - Angular receives
///evil.comas the prefix. - It strips one slash, leaving
//evil.com. - The resulting string is used in the
Locationheader. - Modern browsers interpret
//as a protocol-relative URL, redirecting the user fromhttps://your-app.comtohttps://evil.com.
Attack Preconditions
- The application must use Angular SSR.
- The application must have routes that perform internal redirects.
- The infrastructure (Reverse Proxy/CDN) must pass the
X-Forwarded-Prefixheader to the SSR process without sanitization. - The cache must not vary on the
X-Forwarded-Prefixheader.
Workarounds
Until the patch is applied, developers should sanitize the X-Forwarded-Prefix header in theirserver.ts before the Angular engine processes the request:
app.use((req, res, next) => {
const prefix = req.headers['x-forwarded-prefix']?.trim();
if (prefix) {
// Sanitize by removing all leading slashes
req.headers['x-forwarded-prefix'] = prefix.replace(/^[/\\]+/, '/');
}
next();
});
Resources
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.
Affected versions
Security releases
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.
Remediation advice
- 21.2.0-rc.1
- 21.1.5
- 20.3.17
- 19.2.21
Frequently Asked Questions
- What is CVE-2026-27738? CVE-2026-27738 is a medium-severity open redirect vulnerability in @angular/ssr (npm), affecting versions >= 21.2.0-next.0, < 21.2.0-rc.0. It is fixed in 21.2.0-rc.1, 21.1.5, 20.3.17, 19.2.21. Untrusted input controls a URL used for redirection, which can forward users to attacker-controlled sites.
- Which versions of @angular/ssr are affected by CVE-2026-27738? @angular/ssr (npm) versions >= 21.2.0-next.0, < 21.2.0-rc.0 is affected.
- Is there a fix for CVE-2026-27738? Yes. CVE-2026-27738 is fixed in 21.2.0-rc.1, 21.1.5, 20.3.17, 19.2.21. Upgrade to this version or later.
- Is CVE-2026-27738 exploitable, and should I be worried? Whether CVE-2026-27738 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
- What actually determines whether CVE-2026-27738 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.
- How do I fix CVE-2026-27738?
- Upgrade
@angular/ssrto 21.2.0-rc.1 or later - Upgrade
@angular/ssrto 21.1.5 or later - Upgrade
@angular/ssrto 20.3.17 or later - Upgrade
@angular/ssrto 19.2.21 or later
- Upgrade