Skip to content

Update dependency @angular/ssr to v21.2.3 [SECURITY]#301

Open
SuperSandroBot wants to merge 1 commit intomainfrom
renovate/npm-angular-ssr-vulnerability
Open

Update dependency @angular/ssr to v21.2.3 [SECURITY]#301
SuperSandroBot wants to merge 1 commit intomainfrom
renovate/npm-angular-ssr-vulnerability

Conversation

@SuperSandroBot
Copy link
Contributor

@SuperSandroBot SuperSandroBot commented Feb 25, 2026

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@angular/ssr 21.2.2 -> 21.2.3 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2026-33397

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

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.

Patches

  • 22.0.0-next.2
  • 21.2.3
  • 20.3.21

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


Protocol-Relative URL Injection via Single Backslash Bypass in Angular SSR

CVE-2026-33397 / GHSA-vfx2-hv2g-xj5f

More information

Details

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

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.
Patches
  • 22.0.0-next.2
  • 21.2.3
  • 20.3.21
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

Severity

  • CVSS Score: Unknown
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


Release Notes

angular/angular-cli (@​angular/ssr)

v21.2.3

Compare Source

@​angular/cli
Commit Type Description
1505164bb fix use parsed package name for migrate-only updates
@​angular/build
Commit Type Description
75fa94cad fix alias createRequire banner import to avoid duplicate binding
d009aa1ec fix only use external packages for polyfills when no local files are present
@​angular/ssr
Commit Type Description
f3e0e82c2 fix disallow x-forwarded-prefix starting with a backslash
b8bcd59b4 fix ensure unique values in redirect response Vary header
84385411d fix support custom headers in redirect responses

Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

@SuperSandroBot SuperSandroBot force-pushed the renovate/npm-angular-ssr-vulnerability branch from fbdd570 to d4c6d08 Compare February 25, 2026 23:29
@SuperSandroBot SuperSandroBot changed the title Update dependency @angular/ssr to v21.1.5 [SECURITY] Update dependency @angular/ssr to v21.1.5 [SECURITY] - autoclosed Mar 15, 2026
@SuperSandroBot SuperSandroBot deleted the renovate/npm-angular-ssr-vulnerability branch March 15, 2026 20:59
@SuperSandroBot SuperSandroBot changed the title Update dependency @angular/ssr to v21.1.5 [SECURITY] - autoclosed Update dependency @angular/ssr to v21.1.5 [SECURITY] Mar 19, 2026
@SuperSandroBot SuperSandroBot force-pushed the renovate/npm-angular-ssr-vulnerability branch from 850de32 to d4c6d08 Compare March 19, 2026 21:30
@SuperSandroBot SuperSandroBot changed the title Update dependency @angular/ssr to v21.1.5 [SECURITY] Update dependency @angular/ssr to v21.2.3 [SECURITY] Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants