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

GHSA-F67J-2JQW-JPQ7

Angular SSR: Denial of Service (DoS) via Infinite Loop on Malformed DOCTYPE

Parche disponible
Descargar PNG JSON
CVSS
—
high
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche3 versionesPrimer parche a -19 d de la divulgación
Exposición52 dDesde la divulgación, 28 sept 2026, 4:31 p. m.
Detección49 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.31 +2
Monitoreo
Detectada
9 sept 26
28 sept 26
17 nov 26
20 nov 26
9 sept 26
27 sept 26
15 oct 26
2 nov 26
20 nov 26
FechaFaseEventoDetalle
Remediación Parche 20.3.31 @angular/platform-server · -19 d desde divulgación
Remediación Parche 21.2.23 @angular/platform-server · -19 d desde divulgación
Remediación Parche 22.1.6 @angular/platform-server · -19 d desde divulgación
Divulgación Publicada GHSA-F67J-2JQW-JPQ7 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

A Denial of Service (DoS) vulnerability exists in `@angular/platform-server`'s DOM emulation parser (`domino`). When processing untrusted user input containing an incomplete DOCTYPE declaration ending with whitespace before EOF (such as `<!DOCTYPE html `), the HTML parser enters an infinite synchronous loop, pegging CPU utilization at 100% and completely freezing the Node.js server process.

### Technical Description
In Angular Server-Side Rendering (SSR), `@angular/platform-server` uses `domino` to parse and sanitize HTML bound through template bindings (such as `[innerHTML]`) or manipulated via DOM APIs.

In Domino's HTML parser (`lib/HTMLParser.js`), tokenizer states that specify fixed lookahead—such as `after_doctype_name_state` (`lookahead = 6`)—rely on the state handler function to explicitly advance the character index pointer (`nextchar`). While branches for whitespace, `>`, and keyword matching advance `nextchar`, the EOF branch (`case -1: // EOF`) emitted doctype and EOF tokens without advancing `nextchar` or transitioning out of the state:

case -1: // EOF
  forcequirks();
  emitDoctype();
  emitEOF();
  break;

Because `nextchar` remained unchanged pointing to the EOF marker character (`\uFFFF`), the scanner loop (`while (nextchar < numchars)`) repeatedly re-invoked `after_doctype_name_state` with `codepoint = EOF` indefinitely. In Node.js's single-threaded runtime, this synchronous loop starves the event loop entirely.

### Impact & Reachability
* Reachability: The vulnerability is reachable in any Angular SSR application where untrusted user input is bound to `[innerHTML]`, interpolated into markup, or sanitized on the server.
* Impact: Successful exploitation allows an unauthenticated remote attacker to cause an immediate Denial of Service (DoS) by sending a payload containing an incomplete DOCTYPE (e.g., `<!DOCTYPE html `). The Node.js SSR process locks up at 100% CPU and ceases responding to all concurrent and subsequent HTTP requests.

Proof of Concept:

import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  standalone: true,
  template: `<div [innerHTML]="payload"></div>`,
})
export class AppComponent {
  // Attacker-controlled input containing an incomplete DOCTYPE ending with whitespace
  payload = '<!DOCTYPE html ';
}

### Workarounds
* Avoid binding untrusted user input directly to `[innerHTML]` in server-rendered templates; use standard text interpolation (`{{ userInput }}`) or `[textContent]` when raw HTML rendering is not required.
* Validate or sanitize user input before passing it to `[innerHTML]` on the server by stripping or rejecting strings matching `/^<!DOCTYPE/i`.

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.31
@angular/platform-server≥ 21.0.0 < 21.2.23
@angular/platform-server≥ 22.0.0 < 22.1.6
19.2.25
20.0.0
20.3.31
21.0.0
21.2.23
22.0.0
22.1.6
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.31, 21.2.23, 22.1.6 -19 d · -19 d · -19 d 22.2.6 no afectada
Versiones corregidas20.3.3121.2.2322.1.6
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-f67j-2jqw-jpq7
Otrahttps://github.com/angular/angular

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