@angular/platform-server: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (CVE-2026-50555)
A Cross-Site Scripting (XSS) vulnerability exists in @angular/platform-server's dependency domino when serializing raw-text elements like <script>, <style>, and <iframe>. A Unicode index alignment bug causes the escaping logic to fail if astral Unicode characters precede closing tags, allowing unescaped closing tags in output HTML. This enables attackers controlling dynamic text to inject scripts during server-side rendering (SSR), leading to same-origin XSS. Patched versions are 19.2.25, 20.3.24, 21.2.16, and 22.0.0-rc.2. Workarounds include avoiding user-controlled input in raw-text elements or sanitizing input to strip closing tags.
AI Analysis
Technical Summary
The vulnerability in @angular/platform-server arises from its DOM emulation dependency domino's improper escaping of raw-text elements during serialization. Due to a Unicode index alignment bug related to UTF-16 code unit counting of astral characters, the replacement logic miscalculates offsets and fails to escape closing tags such as </script>, </style>, or </iframe>. This failure allows an attacker who controls dynamic text containing astral characters and closing tags to break out of raw-text contexts and inject executable script blocks during SSR. This results in same-origin Cross-Site Scripting (XSS) attacks against users of SSR-rendered pages that bind user-controlled data inside raw-text elements. The vulnerability affects versions up to and including 18.2.14 and is fixed in versions 19.2.25 and later.
Potential Impact
This vulnerability enables attackers to execute arbitrary JavaScript in the context of the affected web application by injecting malicious scripts through user-controlled input bound inside raw-text elements during server-side rendering. The impact includes session hijacking, credential theft, unauthorized actions on behalf of users, and potential defacement of web pages. The vulnerability is classified as high severity due to the potential for significant compromise of user security and application integrity.
Mitigation Recommendations
A fix is available in @angular/platform-server versions 19.2.25, 20.3.24, 21.2.16, and 22.0.0-rc.2. Users should upgrade to one of these patched versions to remediate the vulnerability. If immediate upgrading is not possible, avoid binding user-controlled input inside raw-text elements such as <iframe>, <script>, or <style>. Additionally, sanitize any user input placed inside these elements to explicitly remove closing tags before rendering to prevent injection of executable code.
@angular/platform-server: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (CVE-2026-50555)
Description
A Cross-Site Scripting (XSS) vulnerability exists in @angular/platform-server's dependency domino when serializing raw-text elements like <script>, <style>, and <iframe>. A Unicode index alignment bug causes the escaping logic to fail if astral Unicode characters precede closing tags, allowing unescaped closing tags in output HTML. This enables attackers controlling dynamic text to inject scripts during server-side rendering (SSR), leading to same-origin XSS. Patched versions are 19.2.25, 20.3.24, 21.2.16, and 22.0.0-rc.2. Workarounds include avoiding user-controlled input in raw-text elements or sanitizing input to strip closing tags.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in @angular/platform-server arises from its DOM emulation dependency domino's improper escaping of raw-text elements during serialization. Due to a Unicode index alignment bug related to UTF-16 code unit counting of astral characters, the replacement logic miscalculates offsets and fails to escape closing tags such as </script>, </style>, or </iframe>. This failure allows an attacker who controls dynamic text containing astral characters and closing tags to break out of raw-text contexts and inject executable script blocks during SSR. This results in same-origin Cross-Site Scripting (XSS) attacks against users of SSR-rendered pages that bind user-controlled data inside raw-text elements. The vulnerability affects versions up to and including 18.2.14 and is fixed in versions 19.2.25 and later.
Potential Impact
This vulnerability enables attackers to execute arbitrary JavaScript in the context of the affected web application by injecting malicious scripts through user-controlled input bound inside raw-text elements during server-side rendering. The impact includes session hijacking, credential theft, unauthorized actions on behalf of users, and potential defacement of web pages. The vulnerability is classified as high severity due to the potential for significant compromise of user security and application integrity.
Mitigation Recommendations
A fix is available in @angular/platform-server versions 19.2.25, 20.3.24, 21.2.16, and 22.0.0-rc.2. Users should upgrade to one of these patched versions to remediate the vulnerability. If immediate upgrading is not possible, avoid binding user-controlled input inside raw-text elements such as <iframe>, <script>, or <style>. Additionally, sanitize any user input placed inside these elements to explicitly remove closing tags before rendering to prevent injection of executable code.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-hqr9-c56f-3x7f
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-50555"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- HIGH
- Cvss Version
- 4.0
Threat ID: 6a58b40e68715ace43d67cbd
Added to database: 07/16/2026, 10:35:58 UTC
Last enriched: 07/16/2026, 10:51:45 UTC
Last updated: 07/31/2026, 19:22:59 UTC
Views: 7
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.