CVE-2025-62427: Angular SSR has a Server-Side Request Forgery (SSRF) flaw
N/A
Basic Information
Technical Details
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| @angular/ssr | npm | >= 19.0.0-next.0, < 19.2.18 | 19.2.18 |
| @angular/ssr | npm | >= 20.0.0-next.0, < 20.3.6 | 20.3.6 |
| @angular/ssr | npm | >= 21.0.0-next.0, < 21.0.0-next.8 | 21.0.0-next.8 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability exists in the @angular/ssr package and is a Server-Side Request Forgery (SSRF) flaw. The root cause is the improper handling of request URLs within the createRequestUrl function, located in packages/angular/ssr/node/src/request.ts. The analysis of the provided patch commit 5271547c80662de10cb3bcb648779a83f6efedfb confirms this. The vulnerable code used the URL constructor in a way that allowed an attacker to control the server's request destination. Specifically, the line return new URL(originalUrl ?? url, ${protocol}://${hostnameWithPort}); was the source of the issue. If an incoming request path started with //, the URL constructor would treat it as a protocol-relative URL, thus ignoring the intended host and using the one supplied by the attacker in the path. The patch corrects this by creating a single, absolute URL string before passing it to the URL constructor, ensuring the host cannot be overridden. Therefore, the createRequestUrl function is the precise location of the vulnerability.
Vulnerable functions
createRequestUrlpackages/angular/ssr/node/src/request.ts