{"schema":"threatline.record/2","record":{"id":"CVE-2026-101895","aliases":["GHSA-f67j-2jqw-jpq7"],"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`.","categories":["Frameworks"],"product":"@angular/platform-server","vendor":"angular","ecosystem":"npm","affected_ranges":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-f67j-2jqw-jpq7","source_modified_at":"2026-09-28T21:31:22Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"@angular/platform-server"},"range":">= 22.0.0, < 22.1.6"},{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-f67j-2jqw-jpq7","source_modified_at":"2026-09-28T21:31:22Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"@angular/platform-server"},"range":">= 21.0.0, < 21.2.23"},{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-f67j-2jqw-jpq7","source_modified_at":"2026-09-28T21:31:22Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"@angular/platform-server"},"range":">= 20.0.0, < 20.3.31"},{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-f67j-2jqw-jpq7","source_modified_at":"2026-09-28T21:31:22Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"@angular/platform-server"},"range":"<= 19.2.25"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-101895","source_modified_at":"2026-10-14T17:38:10.017Z","fetched_at":"2026-10-23T18:45:31.882637Z","product":"angular","vendor":"angular","versions":[{"status":"affected","version":"<= 19.2.25"},{"status":"affected","version":">= 20.0.0, < 20.3.31"},{"status":"affected","version":">= 21.0.0, < 21.2.23"},{"status":"affected","version":">= 22.0.0, < 22.1.6"}],"defaultStatus":null},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-101895","source_modified_at":"2026-10-14T17:38:10.017Z","fetched_at":"2026-10-23T18:45:31.882637Z","product":"platform-server","vendor":"@angular/","versions":[{"status":"affected","version":"<= 19.2.25"},{"status":"affected","version":">= 20.0.0, < 20.3.31"},{"status":"affected","version":">= 21.0.0, < 21.2.23"},{"status":"affected","version":">= 22.0.0, < 22.1.6"}],"defaultStatus":null},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-f67j-2jqw-jpq7","source_modified_at":"2026-09-28T21:45:03.879204328Z","fetched_at":"2026-10-23T18:55:00.935475Z","package":{"name":"@angular/platform-server","ecosystem":"npm","purl":"pkg:npm/%40angular/platform-server"},"ranges":[{"type":"SEMVER","events":[{"introduced":"22.0.0"},{"fixed":"22.1.6"}]}],"versions":[]},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-f67j-2jqw-jpq7","source_modified_at":"2026-09-28T21:45:03.879204328Z","fetched_at":"2026-10-23T18:55:00.935475Z","package":{"name":"@angular/platform-server","ecosystem":"npm","purl":"pkg:npm/%40angular/platform-server"},"ranges":[{"type":"SEMVER","events":[{"introduced":"21.0.0"},{"fixed":"21.2.23"}]}],"versions":[]},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-f67j-2jqw-jpq7","source_modified_at":"2026-09-28T21:45:03.879204328Z","fetched_at":"2026-10-23T18:55:00.935475Z","package":{"name":"@angular/platform-server","ecosystem":"npm","purl":"pkg:npm/%40angular/platform-server"},"ranges":[{"type":"SEMVER","events":[{"introduced":"20.0.0"},{"fixed":"20.3.31"}]}],"versions":[]},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-f67j-2jqw-jpq7","source_modified_at":"2026-09-28T21:45:03.879204328Z","fetched_at":"2026-10-23T18:55:00.935475Z","package":{"name":"@angular/platform-server","ecosystem":"npm","purl":"pkg:npm/%40angular/platform-server"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"19.2.25"}]}],"versions":[]}],"fixed_versions":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-f67j-2jqw-jpq7","source_modified_at":"2026-09-28T21:31:22Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"@angular/platform-server"},"version":"22.1.6"},{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-f67j-2jqw-jpq7","source_modified_at":"2026-09-28T21:31:22Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"@angular/platform-server"},"version":"21.2.23"},{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-f67j-2jqw-jpq7","source_modified_at":"2026-09-28T21:31:22Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"@angular/platform-server"},"version":"20.3.31"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-f67j-2jqw-jpq7","source_modified_at":"2026-09-28T21:45:03.879204328Z","fetched_at":"2026-10-23T18:55:00.935475Z","package":{"name":"@angular/platform-server","ecosystem":"npm","purl":"pkg:npm/%40angular/platform-server"},"version":"22.1.6"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-f67j-2jqw-jpq7","source_modified_at":"2026-09-28T21:45:03.879204328Z","fetched_at":"2026-10-23T18:55:00.935475Z","package":{"name":"@angular/platform-server","ecosystem":"npm","purl":"pkg:npm/%40angular/platform-server"},"version":"21.2.23"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-f67j-2jqw-jpq7","source_modified_at":"2026-09-28T21:45:03.879204328Z","fetched_at":"2026-10-23T18:55:00.935475Z","package":{"name":"@angular/platform-server","ecosystem":"npm","purl":"pkg:npm/%40angular/platform-server"},"version":"20.3.31"}],"cvss":8.7,"severity":"High","kev":{"listed":false},"epss":{"probability":0.00716,"percentile":0.53242,"score_date":"2026-10-23"},"published_at":"2026-10-14T15:00:14.385Z","modified_at":"2026-10-14T17:38:10.017Z","provenance":[{"source":"GitHub Advisory Database","url":"https://github.com/advisories/GHSA-f67j-2jqw-jpq7","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-09-28T21:31:22Z"},{"source":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-101895","fetched_at":"2026-10-23T18:45:31.882637Z","source_modified_at":"2026-10-14T17:38:10.017Z"},{"source":"OSV","url":"https://osv.dev/vulnerability/GHSA-f67j-2jqw-jpq7","fetched_at":"2026-10-23T18:55:00.935475Z","source_modified_at":"2026-09-28T21:45:03.879204328Z"},{"source":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-101895","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-23"}],"sources":["GitHub Advisory Database","CVE List","OSV","EPSS"],"references":[{"source":"CVE List","url":"https://github.com/angular/angular/security/advisories/GHSA-f67j-2jqw-jpq7","tags":["exploit"]},{"url":"https://github.com/advisories/GHSA-f67j-2jqw-jpq7","source":"GitHub Advisory Database"},{"source":"CVE List","url":"https://github.com/angular/angular/commit/3db26e2544964d07a520836ad01f02f36ec88e25","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/angular/angular/commit/fc2e8fbc0bda2f5c11585e8a0cbd88c074f5e567","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/angular/domino/commit/4d97473116d000e3fd4d6f75ec98cbd67576fa6f","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/angular/angular/releases/tag/v20.3.31","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/angular/angular/releases/tag/v21.2.23","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/angular/angular/releases/tag/v22.1.6","tags":["x_refsource_MISC"]}],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"cve_state":"PUBLISHED","ssvc":{"exploitation":"poc","automatable":"yes","technical_impact":"partial","assessed_at":"2026-10-14T17:37:35.859234Z"},"classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":"product","confidence":"heuristic","reviewed":false},"change_timestamp":"2026-10-14T17:38:10.017Z","content_hash":"bf952f51aaa6b007e8fb79087ebdc0fa5796a8505298a5a0ecf03acd7e26f212"}}
