DEV Community

CVE Reports
CVE Reports

Posted on • Originally published at cvereports.com

CVE-2026-27739: Angular SSR: When 'Helpful' Headers Become Server-Side Sabotage

Angular SSR: When 'Helpful' Headers Become Server-Side Sabotage

Vulnerability ID: CVE-2026-27739
CVSS Score: 9.2
Published: 2026-02-25

A critical Server-Side Request Forgery (SSRF) vulnerability in Angular's Server-Side Rendering (SSR) pipeline turns the framework's URL reconstruction logic against itself. By blindly trusting 'X-Forwarded-*' headers, Angular allows attackers to hijack internal API requests, effectively turning the SSR server into an open proxy for internal network probing and credential exfiltration. It's a classic case of 'implicit trust' gone wrong in a stateless environment.

TL;DR

Angular SSR failed to validate HTTP Host headers when reconstructing absolute URLs for server-side HTTP requests. Attackers can inject malicious 'X-Forwarded-Host' headers to steer internal API calls toward arbitrary destinations (SSRF). This allows bypassing firewalls, accessing cloud metadata services, or stealing authentication tokens meant for the backend.


⚠️ Exploit Status: POC

Technical Details

  • CWE ID: CWE-918 (SSRF)
  • CVSS v4.0: 9.2 (Critical)
  • Attack Vector: Network (Header Injection)
  • Impact: High Confidentiality (VC:H, SC:H)
  • Exploit Status: Proof-of-Concept Available
  • Patch Date: 2026-02-23

Affected Systems

  • Angular CLI < 19.2.21
  • Angular CLI 20.x < 20.3.17
  • Angular CLI 21.x < 21.1.5
  • @nguniversal/common (Deprecated)
  • @nguniversal/express-engine (Deprecated)
  • angular-cli: < 19.2.21 (Fixed in: 19.2.21)
  • angular-cli: >= 20.0.0-next.0 < 20.3.17 (Fixed in: 20.3.17)
  • angular-cli: >= 21.0.0-next.0 < 21.1.5 (Fixed in: 21.1.5)

Code Analysis

Commit: PR #325

feat(@angular/ssr): add allowedHosts option and validate headers

Added VALID_HOST_REGEX, VALID_PORT_REGEX, and allowedHosts check in CommonEngine
Enter fullscreen mode Exit fullscreen mode

Exploit Details

Mitigation Strategies

  • Strict Allowlisting of Host headers
  • Sanitization of X-Forwarded-* headers at the ingress/proxy level
  • Network segmentation to prevent SSR servers from accessing internal metadata endpoints
  • Patching Angular CLI and SSR packages

Remediation Steps:

  1. Upgrade angular-cli to version 21.1.5, 20.3.17, or 19.2.21.
  2. Open angular.json and navigate to architect > build > options.
  3. Add the allowedHosts array containing your production domain names.
  4. Redeploy the SSR application.
  5. Verify the fix by sending a request with X-Forwarded-Host: evil.com and confirming it triggers a 400 Bad Request or is ignored.

References


Read the full report for CVE-2026-27739 on our website for more details including interactive diagrams and full exploit analysis.

Top comments (0)