{"id":"GHSA-hqr9-c56f-3x7f","revision":"2f1f3bcac7614ccb9b3fdc9c967bfcb9","records":[{"revision":"2f1f3bcac7614ccb9b3fdc9c967bfcb9","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-hqr9-c56f-3x7f","aliases":["CVE-2026-50555"],"title":"@angular/platform-server: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')","description":"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>`).\n\n`domino` supports escaping raw-text elements during serialization to prevent closing-tag breakout. However, a **Unicode index alignment bug** existed in this escaping logic.\n\nIn 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.\n\nThis misalignment caused `domino` to fail to replace or escape the closing tag, leaving it raw and unescaped in the output HTML.\n\nAn attacker who controls the dynamic text can supply a payload containing both an astral Unicode character and a closing tag (e.g., `\uD83D\uDE00</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).\n\n### Impact\n\nThis 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 raw-text elements. This can lead to session hijacking, credentials theft, unauthorized actions on behalf of users, and defacement.\n\n### Patched Versions\n\n- 22.0.0-rc.2\n- 21.2.16\n- 20.3.24\n- 19.2.25\n\n### Workarounds\n\nIf you cannot immediately update your dependencies, you can:\n\n- Avoid binding user-controlled values inside `<iframe>` or other raw-text elements.\n- Sanitize any user input placed inside raw-text elements to explicitly strip closing tags before passing it to the template.","state":0,"publishedAt":"2026-06-15T17:20:30+00:00","modifiedAt":"2026-07-15T22:30:44.4790479+00:00","affected":[{"ecosystem":"npm","name":"@angular/platform-server","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"22.0.0-next.0"},{"kind":"fixed","version":"22.0.0-rc.2"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"@angular/platform-server","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"21.0.0-next.0"},{"kind":"fixed","version":"21.2.16"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"@angular/platform-server","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"20.0.0-next.0"},{"kind":"fixed","version":"20.3.24"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"@angular/platform-server","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"19.0.0-next.0"},{"kind":"fixed","version":"19.2.25"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"@angular/platform-server","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"last_affected","version":"18.2.14"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":null,"severity":null},{"system":"CVSS_V4","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","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/angular/angular/security/advisories/GHSA-hqr9-c56f-3x7f","https://nvd.nist.gov/vuln/detail/CVE-2026-50555","https://github.com/angular/domino/pull/29","https://github.com/angular/angular"],"sourceUrl":"https://github.com/advisories/GHSA-hqr9-c56f-3x7f","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-hqr9-c56f-3x7f","identifiers":["GHSA-hqr9-c56f-3x7f","CVE-2026-50555"]},"retained":false,"historicalAffected":[]}],"coverage":[]}