CVE-2026-101895: Angular SSR Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-f67j-2jqw-jpq7
CWE-400 CWE-835
Published
Advisory Summary

CVE-2026-101895 is a HIGH denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Angular SSR libraries in the npm ecosystem. The issue involves denial of service (dos) via infinite loop on malformed doctype. Remediation is available by upgrading affected packages to version 22.1.6, 21.2.23, 20.3.31.

CVE-2026-101895 at a Glance

CVE Identifier CVE-2026-101895
GHSA Identifier GHSA-f67j-2jqw-jpq7
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Angular SSR
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-101895

To remediate this vulnerability, upgrade all affected Angular SSR dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@angular/platform-server fixed: 22.1.6
npm install @angular/platform-server@22.1.6
@angular/platform-server fixed: 21.2.23
npm install @angular/platform-server@21.2.23
@angular/platform-server fixed: 20.3.31
npm install @angular/platform-server@20.3.31
@angular/platform-server fixed: Latest secure release
npm install @angular/platform-server@Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @angular/platform-server

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-101895, inspect your project dependencies using npm:

npm ls @angular/platform-server

Analyze the terminal output to locate any version of Angular SSR in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 22.1.6), your application is affected.

Note: The npm ls @angular/platform-server command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Angular SSR, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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: ```javascript 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:** ```ts 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`.

CVE-2026-101895 Affected Angular SSR Versions

4 component(s)
Fixed Versions:
22.1.621.2.2320.3.31
Product / Package Ecosystem Affected Versions Fixed Version
@angular/platform-server
npm
≥ 22.0.0
< 22.1.6
22.1.6
@angular/platform-server
npm
≥ 21.0.0
< 21.2.23
21.2.23
@angular/platform-server
npm
≥ 20.0.0
< 20.3.31
20.3.31
@angular/platform-server
npm
≤ 19.2.25

References

Frequently Asked Questions

What is CVE-2026-101895?
CVE-2026-101895 is a security vulnerability in Angular SSR involving Denial of Service (DoS) via Infinite Loop on Malformed DOCTYPE under CWE-400: Uncontrolled Resource Consumption.
Which Angular SSR versions are affected?
Affected versions include releases prior to 22.1.6, 21.2.23, 20.3.31 across affected packages: @angular/platform-server.
What version fixes CVE-2026-101895?
Upgrading to 22.1.6, 21.2.23, 20.3.31 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @angular/platform-server affected?
Yes, @angular/platform-server is affected in releases prior to 22.1.6, 21.2.23, 20.3.31, Latest secure release. Upgrade your dependency to 22.1.6, 21.2.23, 20.3.31, Latest secure release or later.
What CWE is associated with CVE-2026-101895?
CVE-2026-101895 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check npm dependencies for CVE-2026-101895?
Run the dependency tree command: 'npm ls @angular/platform-server'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-f67j-2jqw-jpq7",
  "modified" : "2026-09-28T21:31:21Z",
  "published" : "2026-09-28T21:31:21Z",
  "aliases" : [ "CVE-2026-101895" ],
  "summary" : "Angular SSR: Denial of Service (DoS) via Infinite Loop on Malformed DOCTYPE",
  "details" : "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.\n\n### Technical Description\nIn 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.\n\nIn 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:\n\n```javascript\ncase -1: // EOF\n  forcequirks();\n  emitDoctype();\n  emitEOF();\n  break;\n```\n\nBecause `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.\n\n### Impact & Reachability\n* **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.\n* **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.\n\n**Proof of Concept:**\n```ts\nimport { Component } from '@angular/core';\n\n@Component({\n  selector: 'app-root',\n  standalone: true,\n  template: `<div [innerHTML]=\"payload\"></div>`,\n})\nexport class AppComponent {\n  // Attacker-controlled input containing an incomplete DOCTYPE ending with whitespace\n  payload = '<!DOCTYPE html ';\n}\n```\n\n### Workarounds\n* 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.\n* Validate or sanitize user input before passing it to `[innerHTML]` on the server by stripping or rejecting strings matching `/^<!DOCTYPE/i`.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@angular/platform-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "22.0.0"
      }, {
        "fixed" : "22.1.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@angular/platform-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "21.0.0"
      }, {
        "fixed" : "21.2.23"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@angular/platform-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "20.0.0"
      }, {
        "fixed" : "20.3.31"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@angular/platform-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "19.2.25"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/angular/angular/security/advisories/GHSA-f67j-2jqw-jpq7"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/angular/angular"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400", "CWE-835" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-28T21:31:21Z",
    "nvd_published_at" : null
  }
}