CVE-2025-62427: Angular SSR has a Server-Side Request Forgery (SSRF) flaw
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
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 →