Media

Protocol-Relative URL Injection via Single Backslash Bypass in Angular SSR

  • Publicada: 19.03.2026
  • Actualizado: 11.10.2026 10:22

An Open Redirect vulnerability exists in @angular/ssr due to an incomplete fix for CVE-2026-27738. While the original fix successfully blocked multiple leading slashes (e.g., ///), the internal validation logic fails to account for a single backslash (\) bypass.

When an Angular SSR application is deployed behind a proxy that passes the X-Forwarded-Prefix header:

  • An attacker provides a value starting with a single backslash (e.g., \evil.com).
  • The internal validation failed to flag the single backslash as invalid.
  • The application prepends a leading forward slash, resulting in a Location header containing /\evil.com.
  • Modern browsers interpret the /\ sequence as //, treating it as a protocol-relative URL and redirecting the user to the attacker-controlled domain.

Furthermore, the response lacks the Vary: X-Forwarded-Prefix header, allowing the malicious redirect to be stored in intermediate caches (Web Cache Poisoning).

Impact

This vulnerability allows attackers to conduct large-scale phishing and SEO hijacking:

  • Scale: A single request can poison a high-traffic route, impacting all users until the cache expires.
  • SEO Poisoning: Search engine crawlers may follow and index these malicious redirects, causing the legitimate site to be delisted or associated with malicious domains.
  • Trust: Because the initial URL belongs to the trusted domain, users and security tools are less likely to flag the redirect as malicious.

Patches

  • 22.0.0-next.2
  • 21.2.3
  • 20.3.21

Workarounds

Until the patch is applied, developers should sanitize the X-Forwarded-Prefix header in their server.ts before the Angular engine processes the request:

ts
app.use((req, res, next) => {
  const prefix = req.headers['x-forwarded-prefix'];
  if (typeof prefix === 'string') {
    // Sanitize by removing all leading forward and backward slashes
    req.headers['x-forwarded-prefix'] = prefix.trim().replace(/^[/\\]+/, '/');
  }
  next();
});

References

Software afectado

Haz clic en una tecnología para ver todas sus vulnerabilidades.

PlataformaPaqueteVersiones vulnerablesCorregida en
Paquete de npm @angular/ssr >= 22.0.0-next.0, < 22.0.0-next.2, >= 21.0.0-next.0, < 21.2.3, >= 20.0.0-next.0, < 20.3.21 22.0.0-next.2, 21.2.3, 20.3.21

Referencias

Puntuación CVSS 6.1/10
Vector CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Debilidad (CWE)
CWE-601
Plataforma
npm
Paquete
@angular/ssr
Publicada
19.03.2026
Actualizado
11.10.2026 10:22

Fuentes y licencias

OSV / GitHub Advisory Database - GHSA-vfx2-hv2g-xj5f - CC BY 4.0

Historial de vulnerabilidades: @angular/ssr

Todas las vulnerabilidades publicadas de este paquete (Paquete de npm), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.

Entradas en total
7
Primera → última
09.2025 10.2026
Sin corrección
0
Explotada en ataques
0

Distribución por gravedad

  • Crítica 1
  • Alta 2
  • Media 4

Divulgaciones por año

  1. 2025: 2
  2. 2026: 5
  1. Media CVE-2026-104871 >= 22.0.0, < 22.1.7, >= 21.0.0, < 21.2.23, >= 20.0.0, < 20.3.36, <= 19.2.27 22.1.7, 21.2.23, 20.3.36
  2. Media CVE-2026-44437 >= 22.0.0-next.0, < 22.0.0-next.7, >= 21.0.0-next.0, < 21.2.9, >= 20.0.0-next.0, < 20.3.25, >= 19.0.0-next.0, < 19.2.25 22.0.0-next.7, 21.2.9, 20.3.25, 19.2.25
  3. Protocol-Relative URL Injection via Single Backslash Bypass in Angular SSR esta entrada
    Media · 6.1 CVE-2026-33397 >= 22.0.0-next.0, < 22.0.0-next.2, >= 21.0.0-next.0, < 21.2.3, >= 20.0.0-next.0, < 20.3.21 22.0.0-next.2, 21.2.3, 20.3.21
  4. Crítica CVE-2026-27739 >= 21.2.0-next.0, < 21.2.0-rc.1, >= 21.0.0-next.0, < 21.1.5, >= 20.0.0-next.0, < 20.3.17, < 19.2.21 21.2.0-rc.1, 21.1.5, 20.3.17, 19.2.21
  5. Media CVE-2026-27738 >= 21.2.0-next.0, < 21.2.0-rc.1, >= 21.0.0-next.0, < 21.1.5, >= 20.0.0-next.0, < 20.3.17, >= 19.0.0-next.0, < 19.2.21 21.2.0-rc.1, 21.1.5, 20.3.17, 19.2.21
  6. Alta CVE-2025-62427 >= 19.0.0-next.0, < 19.2.18, >= 20.0.0-next.0, < 20.3.6, >= 21.0.0-next.0, < 21.0.0-next.8 19.2.18, 20.3.6, 21.0.0-next.8
  7. Alta CVE-2025-59052 >= 17.0.0-next.0, < 18.2.21, >= 19.0.0-next.0, < 19.2.16, >= 20.0.0-next.0, < 20.3.0, >= 21.0.0-next.0, < 21.0.0-next.3 18.2.21, 19.2.16, 20.3.0, 21.0.0-next.3

Identifica las vulnerabilidades de tu aplicación

Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.

Conectar tu aplicación
Newsletter DockRay

La seguridad de tus aplicaciones en tu correo

Vulnerabilidades importantes, recomendaciones concretas y consejos prácticos para tus aplicaciones. Elige tus tecnologías y sigue lo que importa para tu proyecto.

  • Un resumen diario de nuevas vulnerabilidades, también las críticas.
  • Avisos sobre actualizaciones importantes.
  • Consejos prácticos sobre seguridad y monitorización de aplicaciones.

Déjalo vacío para recibir avisos de todas las tecnologías.

Suscripción gratuita. Date de baja con un clic en cualquier correo.