This CVE exposes a parsing-context vulnerability in Angular's server-side rendering that targets a narrow but critical surface: developers using Angular's low-level DOM escape hatches within specific HTML container elements. The vulnerability affects the SSR serializer's handling of nodes created via inject(DOCUMENT).createProcessingInstruction or Renderer2 DOM insertion when those nodes exist inside noscript, iframe, noembed, or noframes containers. These containers employ HTML5 RAWTEXT parsing rules, which Angular's serializer was not tracking — creating a context where attacker-controlled data can bypass escaping and achieve XSS.
If you're maintaining an Angular library that touches these APIs, your attack surface extends beyond your own code. The 'attacker-controlled data' vector means a compromised npm dependency, a malicious CMS plugin, or a compromised content pipeline can feed payload data through these APIs without your application ever directly using them. This is a supply-chain-amplified vulnerability: the exploit path doesn't require the consuming app to touch inject(DOCUMENT) directly — only to process content that flows through a library that does.
Audit your dependency tree for packages that implement custom SSR adapters, rendering optimizers, or that serialize DOM nodes into HTML strings. If any of those packages interact with the DOCUMENT injection token or Renderer2 in contexts that might include noscript, iframe, noembed, or noframes — either directly or through content they process — they are candidates for review. The fix requires Angular's SSR serializer to track ancestor context during serialization, which means simply upgrading Angular may not protect third-party libraries that replicate this pattern independently.
The deeper architectural lesson: Angular's escape-hatch APIs (Renderer2, inject(DOCUMENT)) provide flexibility but carry parsing-context risks that standard Angular template authoring avoids by construction. These APIs have existed since Angular 2.0 and were repeatedly re-trusted across major version migrations without systematic security review of their interaction with evolving HTML5 parsing spec implementations. Library authors consuming these APIs should treat any serialization of DOM nodes into fallback containers as security-sensitive code requiring explicit review, not assume the framework's SSR layer handles this context automatically.