CVE-2026-50556: Angular: Missing `<noscript>` Raw-Text Serialization Escaping leads to Cross-Site Scripting (XSS) in Angular SSR
A Cross-Site Scripting (XSS) vulnerability exists in @angular/platform-server's DOM emulation dependency (domino) when serializing the content of <noscript> elements.
When rendering dynamic text content inside a <noscript> element via template bindings (such as {{ value }} or [textContent]), the template engine expects the browser to render the content safely. Under Server-Side Rendering (SSR), domino is configured with scripting enabled, meaning <noscript> is treated as a raw-text element.
However, domino's serializer completely omitted <noscript> from the list of raw-text elements requiring closing-tag escaping during DOM serialization. As a result, any occurrence of </noscript> in the bound dynamic text was never escaped under any circumstances.
The unescaped closing tag was serialized directly into the output HTML (e.g. <noscript></noscript><script>alert(1)</script></noscript>). When parsed by a browser, it closes the <noscript> block early, allowing the injected <script> block to execute in the user's browser context, causing same-origin Cross-Site Scripting (XSS).
Impact
This vulnerability allows an attacker to perform same-origin Cross-Site Scripting (XSS) attacks against any user visiting an SSR-rendered page that binds user-controlled data inside a <noscript> element. This can lead to session hijacking, credentials theft, unauthorized actions on behalf of users, and defacement.
Patched Versions
- 22.0.0-rc.2 - 21.2.16 - 20.3.24 - 19.2.25
Workarounds
If you cannot immediately update your dependencies, you can:
- Avoid binding user-controlled values inside <noscript> elements. - Sanitize any user input placed inside <noscript> to explicitly strip closing </noscript> tags before passing it to the template.
Other sources
Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages. Prior to 22.0.0-rc.2, 21.2.16, 20.3.24, and 19.2.25, a Cross-Site Scripting (XSS) vulnerability exists in @angular/platform-server's DOM emulation dependency (domino) when serializing the content of <noscript> elements. When rendering dynamic text content inside a <noscript> element via template bindings (such as {{ value }} or [textContent]), the template engine expects the browser to render the content safely. Under Server-Side Rendering (SSR), domino is configured with scripting enabled, meaning <noscript> is treated as a raw-text element. However, domino's serializer completely omitted <noscript> from the list of raw-text elements requiring closing-tag escaping during DOM serialization. As a result, any occurrence of </noscript> in the bound dynamic text was never escaped under any circumstances. The unescaped closing tag was serialized directly into the output HTML (e.g. <noscript></noscript><script>alert(1)</script></noscript>). When parsed by a browser, it closes the <noscript> block early, allowing the injected <script> block to execute in the user's browser context, causing same-origin Cross-Site Scripting (XSS). This vulnerability is fixed in 22.0.0-rc.2, 21.2.16, 20.3.24, and 19.2.25.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/@angular/platform-serverto a version that resolves this vulnerability.Fixed in 19.2.25 - Upgrade
Upgrade
npm/@angular/platform-serverto a version that resolves this vulnerability.Fixed in 20.3.24 - Upgrade
Upgrade
npm/@angular/platform-serverto a version that resolves this vulnerability.Fixed in 21.2.16 - Upgrade
Upgrade
npm/@angular/platform-serverto a version that resolves this vulnerability.Fixed in 22.0.0-rc.2 - Upgrade
Upgrade
@angular/platform-serverto a version that resolves this vulnerability.Fixed in 19.2.25 - Upgrade
Upgrade
@angular/platform-serverto a version that resolves this vulnerability.Fixed in 20.3.24 - Upgrade
Upgrade
@angular/platform-serverto a version that resolves this vulnerability.Fixed in 21.2.16 - Upgrade
Upgrade
@angular/platform-serverto a version that resolves this vulnerability.Fixed in 22.0.0-rc.2 - Configuration
If you cannot update, avoid binding user-controlled values inside `<noscript>` elements; additionally sanitize any user input placed inside `<noscript>` to explicitly strip closing `</noscript>` tags before passing it to the template.
SSR DOM emulation (domino) used by @angular/platform-server noscript raw-text serialization escaping = Ensure <noscript> content properly escapes raw-text closing tag sequence
Event History
Frequently Asked Questions
What is the severity of CVE-2026-50556?
CVE-2026-50556 has a high severity rating of 8.6 according to the CVSS score.
How do I fix CVE-2026-50556?
To fix CVE-2026-50556, ensure you're using an updated version of the Angular platform that addresses the XSS vulnerability.
What type of vulnerability is CVE-2026-50556?
CVE-2026-50556 is classified as a Cross-Site Scripting (XSS) vulnerability.
Which Angular software is affected by CVE-2026-50556?
CVE-2026-50556 affects the @angular/platform-server package and its DOM emulation dependency, domino.
What causes the vulnerability in CVE-2026-50556?
The vulnerability in CVE-2026-50556 arises from missing raw-text serialization escaping of dynamic content within `<noscript>` elements.