Executive brief
A security vulnerability exists in the Angular framework's server-side rendering (SSR) component, which is used to generate web pages on the server for faster loading. An attacker can inject malicious scripts into certain parts of a web page if the application displays user-provided data within specific HTML tags like iframes or noscript blocks. If exploited, this could allow an attacker to steal user sessions, hijack accounts, or deface the website.
Technical details
A Cross-Site Scripting (XSS) vulnerability exists in @angular/platform-server's DOM emulation dependency (domino) during the serialization of fallback raw-content elements such as <iframe>, <noembed>, <noframes>, and <noscript>. When Angular performs Server-Side Rendering (SSR), domino treats these as raw-text elements but fails to escape text nodes within them. An attacker can provide input containing unescaped closing tags (e.g., </iframe>), which causes the browser to terminate the element early and execute subsequent malicious script blocks. This is particularly impactful when 'inlineCritical' CSS optimization is enabled, as it triggers the vulnerable re-parsing logic. Patches are available in versions 20.3.27, 21.2.19, and 22.0.7.
Affected products
- Angular @angular/platform-server < 19.2.25, >= 20.0.0-next.0, < 20.3.27, >= 21.0.0-next.0, < 21.2.19, >= 22.0.0-next.0, < 22.0.7
Timeline
- 2026-07-29: disclosed
- 2026-08-03: advisory
- 2026-08-03: patched