Description
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 raw-text elements (such as <script>, <style>, and <iframe>). domino supports escaping raw-text elements during serialization to prevent closing-tag breakout. However, a Unicode index alignment bug existed in this escaping logic. In JavaScript, string lengths and character indices are calculated based on UTF-16 code units (where astral characters—such as emojis—occupy 2 code units / 4 bytes). If the bound dynamic text contained astral Unicode characters before the closing tag (e.g. </script>, </style>, or </iframe>), the index offset calculation in domino's replacement logic shifted. This misalignment caused domino to fail to replace or escape the closing tag, leaving it raw and unescaped in the output HTML. An attacker who controls the dynamic text can supply a payload containing both an astral Unicode character and a closing tag (e.g., 😀</iframe><script>alert(1)</script>). When serialized on the server during SSR, the browser parses the unescaped closing tag, exits the raw-text context early, and executes the subsequent <script> block, leading to 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.
Published: 2026-06-22
Score: 8.6 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

A Unicode index alignment bug in the DOM‑emulation library domino, a dependency of @angular/platform-server, causes the serialization of raw‑text elements such as <script>, <style>, and <iframe> to fail when the dynamic content contains astral Unicode characters preceding the closing tag. The bug prevents the proper escape of the closing tag, allowing an attacker‑controlled payload (e.g., an emoji followed by </iframe><script>alert(1)</script>) to be rendered as raw HTML during server‑side rendering. This results in same‑origin XSS, giving the attacker the ability to execute arbitrary JavaScript in the victim’s context, read cookies, local session storage, or perform other actions allowed to the legitimate page owner.

Affected Systems

Angular versions prior to 22.0.0‑rc.2, 21.2.16, 20.3.24, and 19.2.25 are affected. The flaw resides in the @angular/platform-server package’s use of the domino library for HTML serialization. Systems that use server‑side rendering with these Angular versions and allow user‑controlled dynamic text are vulnerable.

Risk and Exploitability

The CVSS score of 8.6 indicates high severity. No EPSS score is available, and the vulnerability is not currently listed in the CISA KEV catalog. Exploitation requires control over content that is serialized on the server during SSR; the attacker can supply a payload containing an astral Unicode character and a closing tag to trigger XSS. Because the attack is client‑side but originates from server‑generated content, the exposure is to any user that views the rendered page. Attackers could leverage this flaw to steal session data or perform actions within the same origin. The absence of an EPSS score and KEV status does not reduce the risk given the high CVSS and the breadth of the affected Angular releases.

Generated by OpenCVE AI on June 22, 2026 at 18:52 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Angular to the fixed releases: 22.0.0‑rc.2 or later, 21.2.16 or later, 20.3.24 or later, or 19.2.25 or later.
  • If an upgrade cannot be performed immediately, limit the use of server‑side rendering for pages that include user‑controlled dynamic text or remove SSR for those components.
  • Sanitize or encode any user‑controlled content on the server side before it is passed to @angular/platform-server to ensure that potentially malicious payloads cannot be serialized into the final HTML.

Generated by OpenCVE AI on June 22, 2026 at 18:52 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-hqr9-c56f-3x7f @angular/platform-server: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
History

Mon, 22 Jun 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Mon, 22 Jun 2026 17:30:00 +0000

Type Values Removed Values Added
Description 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 raw-text elements (such as <script>, <style>, and <iframe>). domino supports escaping raw-text elements during serialization to prevent closing-tag breakout. However, a Unicode index alignment bug existed in this escaping logic. In JavaScript, string lengths and character indices are calculated based on UTF-16 code units (where astral characters—such as emojis—occupy 2 code units / 4 bytes). If the bound dynamic text contained astral Unicode characters before the closing tag (e.g. </script>, </style>, or </iframe>), the index offset calculation in domino's replacement logic shifted. This misalignment caused domino to fail to replace or escape the closing tag, leaving it raw and unescaped in the output HTML. An attacker who controls the dynamic text can supply a payload containing both an astral Unicode character and a closing tag (e.g., 😀</iframe><script>alert(1)</script>). When serialized on the server during SSR, the browser parses the unescaped closing tag, exits the raw-text context early, and executes the subsequent <script> block, leading to 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.
Title Angular: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in @angular/platform-server
Weaknesses CWE-79
References
Metrics cvssV4_0

{'score': 8.6, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-06-22T17:58:33.065Z

Reserved: 2026-06-04T21:34:34.425Z

Link: CVE-2026-50555

cve-icon Vulnrichment

Updated: 2026-06-22T17:57:05.211Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-22T19:00:14Z

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')