Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @angular/ssr
  4. ›
  5. CVE-2025-62427

CVE-2025-62427: Angular SSR has a Server-Side Request Forgery (SSRF) flaw

October 16, 2025

The vulnerability is a Server-Side Request Forgery (SSRF) flaw within the URL resolution mechanism of Angular’s Server-Side Rendering package (@angular/ssr).

The function createRequestUrl uses the native URL constructor. When an incoming request path (e.g., originalUrl or url) begins with a double forward slash (//) or backslash (\\), the URL constructor treats it as a schema-relative URL. This behavior overrides the security-intended base URL (protocol, host, and port) supplied as the second argument, instead resolving the URL against the scheme of the base URL but adopting the attacker-controlled hostname.

This allows an attacker to specify an external domain in the URL path, tricking the Angular SSR environment into setting the page’s virtual location (accessible via DOCUMENT or PlatformLocation tokens) to this attacker-controlled domain. Any subsequent relative HTTP requests made during the SSR process (e.g., using HttpClient.get('assets/data.json')) will be incorrectly resolved against the attacker’s domain, forcing the server to communicate with an arbitrary external endpoint.

References

  • github.com/advisories/GHSA-q63q-pgmf-mxhr
  • github.com/angular/angular-cli
  • github.com/angular/angular-cli/commit/5271547c80662de10cb3bcb648779a83f6efedfb
  • github.com/angular/angular-cli/security/advisories/GHSA-q63q-pgmf-mxhr
  • nvd.nist.gov/vuln/detail/CVE-2025-62427

Code Behaviors & Features

Detect and mitigate CVE-2025-62427 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 →

Affected versions

All versions starting from 19.0.0-next.0 before 19.2.18, all versions starting from 20.0.0-next.0 before 20.3.6, all versions starting from 21.0.0-next.0 before 21.0.0-next.8

Fixed versions

  • 19.2.18
  • 20.3.6
  • 21.0.0-next.8

Solution

Upgrade to versions 19.2.18, 20.3.6, 21.0.0-next.8 or above.

Weakness

  • CWE-918: Server-Side Request Forgery (SSRF)

Source file

npm/@angular/ssr/CVE-2025-62427.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 19 Oct 2025 00:29:22 +0000.