Miggo Logo

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

N/A

CVSS Score

Basic Information

EPSS Score
-
Published
10/16/2025
Updated
10/16/2025
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
-
Package NameEcosystemVulnerable VersionsFirst Patched Version
@angular/ssrnpm>= 19.0.0-next.0, < 19.2.1819.2.18
@angular/ssrnpm>= 20.0.0-next.0, < 20.3.620.3.6
@angular/ssrnpm>= 21.0.0-next.0, < 21.0.0-next.821.0.0-next.8

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot 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

createRequestUrl
packages/angular/ssr/node/src/request.ts
The function `createRequestUrl` was vulnerable to Server-Side Request Forgery (SSRF). It used the `URL` constructor with a base URL, which is the second argument. When the input `originalUrl` or `url` started with a double forward slash (`//`), the `URL` constructor interpreted it as a schema-relative URL. This behavior caused the constructor to use the attacker-controlled hostname from the path, overriding the legitimate hostname provided in the base URL. As a result, any subsequent relative HTTP requests made during server-side rendering would be directed to the attacker's domain.

WAF Protection Rules

WAF Rule

### Imp**t T** vuln*r**ility is * **S*rv*r-Si** R*qu*st *or**ry (SSR*)** *l*w wit*in t** URL r*solution m****nism o* *n*ul*r's S*rv*r-Si** R*n**rin* p**k*** (`@*n*ul*r/ssr`). T** *un*tion `*r**t*R*qu*stUrl` us*s t** n*tiv* `URL` *onstru*tor. W**n *n

Reasoning

T** vuln*r**ility *xists in t** `@*n*ul*r/ssr` p**k*** *n* is * S*rv*r-Si** R*qu*st *or**ry (SSR*) *l*w. T** root **us* is t** improp*r **n*lin* o* r*qu*st URLs wit*in t** `*r**t*R*qu*stUrl` *un*tion, lo**t** in `p**k***s/*n*ul*r/ssr/no**/sr*/r*qu*st