CVE-2026-41423
JSON

8.7high

Angular: SSRF via protocol-relative and backslash URLs in Angular Platform-Server

Severity
8.7high CVSS:4.0 by GitHub_M
Exploit likelihood
0.30% (higher than 25% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-45q2-gjvg-7973

Description

Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages. Prior to versions 19.2.21, 20.3.19, 21.2.9, and 22.0.0-next.8, a Server-Side Request Forgery (SSRF) vulnerability exists in @angular/platform-server due to improper handling of URLs during Server-Side Rendering (SSR). When an attacker sends a request such as GET /\evil.com/ HTTP/1.1 the server engine (Express, etc.) passes the URL string to Angular’s rendering functions. Because the URL parser normalizes the backslash to a forward slash for HTTP/HTTPS schemes, the internal state of the application is hijacked to believe the current origin is evil.com. This misinterpretation tricks the application into treating the attacker’s domain as the local origin. Consequently, any relative HttpClient requests or PlatformLocation.hostname references are redirected to the attacker controlled server, potentially exposing internal APIs or metadata services. This issue has been patched in versions 19.2.21, 20.3.19, 21.2.9, and 22.0.0-next.8.

Affected

Product or packageVersionsReported by
angular angular< 19.2.21, >= 20.0.0-next.0, < 20.3.19, >= 21.0.0-next.0, < 21.2.9, >= 22.0.0-next.0, < 22.0.0-next.8, before 19.2.21, from 20.0.0 before 20.3.19, from 21.0.0 before 21.2.9, 22.0.0CVE List, NVD
@angular/platform-server (npm)from 22.0.0-next.0 before 22.0.0-next.8, from 21.0.0-next.0 before 21.2.9, from 20.0.0-next.0 before 20.3.19, from 19.0.0-next.0 before 19.2.21, up to 18.2.14GitHub Advisory Database

All scores

GitHub_M8.7high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:L/SI:L/SA:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:L/SI:L/SA:N
NVD5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Classification

CWE-918

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages. Prior to versions 19.2.21, 20.3.19, 21.2.9, and 22.0.0-next.8, a Server-Side Request Forgery (SSRF) vulnerability exists in @angular/platform-server due to improper handling of URLs during Server-Side Rendering (SSR). When an attacker sends a request such as GET /\evil.com/ HTTP/1.1 the server engine (Express, etc.) passes the URL string to Angular’s rendering functions. Because the URL parser normalizes the backslash to a forward slash for HTTP/HTTPS schemes, the internal state of the application is hijacked to believe the current origin is evil.com. This misinterpretation tricks the application into treating the attacker’s domain as the local origin. Consequently, any relative HttpClient requests or PlatformLocation.hostname references are redirected to the attacker controlled server, potentially exposing internal APIs or metadata services. This issue has been patched in versions 19.2.21, 20.3.19, 21.2.9, and 22.0.0-next.8.

GitHub Advisory Database
Impact

A Server-Side Request Forgery (SSRF) vulnerability exists in @angular/platform-server due to improper handling of URLs during Server-Side Rendering (SSR).

When an attacker sends a request such as GET /\evil.com/ HTTP/1.1 the server engine (Express, etc.) passes the URL string to Angular’s rendering functions.

Because the URL parser normalizes the backslash to a forward slash for HTTP/HTTPS schemes, the internal state of the application is hijacked to believe the current origin is evil.com. This misinterpretation tricks the application into treating the attacker’s domain as the local origin. Consequently, any relative HttpClient requests or PlatformLocation.hostname references are redirected to the attacker controlled server, potentially exposing internal APIs or metadata services.

Affected APIs:

  • renderModule
  • renderApplication
  • CommonEngine (from @angular/ssr)

Non-Affected APIs:

  • AngularAppEngine (from @angular/ssr)
  • AngularNodeAppEngine (from @angular/ssr)
Attack Preconditions
  • The server has outbound network access.
  • The application uses Angular SSR via the affected APIs.
  • A pathname is passed as URL to the rendering method (e.g. using req.url).
  • The server-side code performs HTTP requests using HttpClient with relative URLs or uses PlatformLocation.hostname to build URLs.
Patches
  • 22.0.0-next.8
  • 21.2.9
  • 20.3.19
  • 19.2.21
Workarounds

Developers should implement a middleware to sanitize the request URL before it reaches Angular. This involves stripping or normalizing leading slashes:

app.use((req, res, next) => {
  // Sanitize the URL to ensure it starts with a single forward slash
  if (req.url.startsWith('//') || req.url.startsWith('/\\') || req.url.startsWith('\\')) {
     req.url = '/' + req.url.replace(/^[/\\]+/, '');
  }
  next();
});

References
NVD (es)

Angular es una plataforma de desarrollo para construir aplicaciones web móviles y de escritorio usando TypeScript/JavaScript y otros lenguajes. Antes de las versiones 19.2.21, 20.3.19, 21.2.9 y 22.0.0-next.8, existe una vulnerabilidad de falsificación de petición del lado del servidor (SSRF) en @angular/platform-server debido a un manejo inadecuado de las URL durante la renderización del lado del servidor (SSR). Cuando un atacante envía una petición como GET /\evil.com/ HTTP/1.1, el motor del servidor (Express, etc.) pasa la cadena de la URL a las funciones de renderización de Angular. Debido a que el analizador de URL normaliza la barra invertida a una barra diagonal para los esquemas HTTP/HTTPS, el estado interno de la aplicación es secuestrado para creer que el origen actual es evil.com. Esta mala interpretación engaña a la aplicación para que trate el dominio del atacante como el origen local. En consecuencia, cualquier petición HttpClient relativa o referencia a PlatformLocation.hostname son redirigidas al servidor controlado por el atacante, exponiendo potencialmente API internas o servicios de metadatos. Este problema ha sido parcheado en las versiones 19.2.21, 20.3.19, 21.2.9 y 22.0.0-next.8.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-41423 changed 2026-05-08CVE Terms of Use
GitHub Advisory DatabaseGHSA-45q2-gjvg-7973 changed 2026-05-12CC-BY-4.0
NVDCVE-2026-41423 changed 2026-11-11Public domain