{"id":"CVE-2026-50557","published":"2026-06-22T15:11:48Z","modified":"2026-06-22T17:54:55Z","title":"Angular: Template and Attribute Namespace Sanitization Bypass (XSS)","vendor":"angular","product":"angular","tier":"tail","description":{"text":"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.15, 20.3.22 and 19.2.22, an issue in the @angular/compiler and @angular/core packages allows bypassing element and attribute sanitization/validation through specific namespace workarounds. Specifically, namespaced script elements (e.g., <svg:script> or <:svg:script>) were not properly identified as script elements by the Angular template preparser, allowing them to pass through template compilation without being stripped. Furthermore, security context schema mappings for element attributes did not consistently handle attributes within namespaced elements (like SVG and MathML), opening up gaps where malicious namespaced attributes could bypass runtime and compile-time sanitizers. Combined, these flaws enable an attacker who can inject or supply a template/tag structure with custom namespaces to bypass Angular's script-stripping logic and attribute sanitizers, leading to client-side Cross-Site Scripting (XSS). This vulnerability is fixed in 22.0.0-rc.2, 21.2.15, 20.3.22 and 19.2.22.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00411,"percentile":0.36287,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/angular/angular/security/advisories/GHSA-f3m7-gqxr-g87x","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/angular/angular/pull/68689","tags":["x_refsource_MISC"]},{"url":"https://github.com/angular/angular/pull/68868","tags":["x_refsource_MISC"]}],"priority":{"score":11.0,"factors":[{"name":"EPSS percentile","points":7.26},{"name":"CVSS severity","points":3.71}]},"vendorSlug":"angular","affectedVersions":[{"vendor":"angular","product":"angular","versions":[">= 21.0.0-next.0 < 21.2.15",">= 22.0.0-next.0 < 22.0.0-rc.2",">= 20.0.0-next.0 < 20.3.22",">= 19.0.0-next.0 < 19.2.22","<= 18.2.14"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2026-06-22T17:51:06.519025Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"@angular/core","vulnerableRanges":[">=21.0.0-next.0, <21.2.15",">=22.0.0-next.0, <22.0.0-rc.2",">=20.0.0-next.0, <20.3.22",">=19.0.0-next.0, <19.2.22","<=18.2.14"],"patched":["21.2.15","22.0.0-rc.2","20.3.22","19.2.22"],"from":["GHSA-f3m7-gqxr-g87x"],"provenance":"source"},{"ecosystem":"npm","package":"@angular/compiler","vulnerableRanges":[">=21.0.0-next.0, <21.2.15",">=22.0.0-next.0, <22.0.0-rc.2",">=20.0.0-next.0, <20.3.22",">=19.0.0-next.0, <19.2.22","<=18.2.14"],"patched":["21.2.15","22.0.0-rc.2","20.3.22","19.2.22"],"from":["GHSA-f3m7-gqxr-g87x"],"provenance":"source"}],"summary":{"text":"Angular's template compiler (@angular/compiler and @angular/core) fails to recognise namespaced script elements such as <svg:script> as scripts and does not consistently apply attribute sanitisation to attributes on namespaced SVG and MathML elements, creating a sanitisation bypass in versions before 22.0.0-rc.2, 21.2.15, 20.3.22 and 19.2.22. An attacker who can inject or supply template markup with custom namespaces can get script past Angular's stripping and attribute sanitisers to achieve client-side cross-site scripting, which requires a user to interact with the affected page.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:08:34Z"},"euvd":{"id":"EUVD-2026-38257","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2021-4231","published":"2022-05-26","fixed":"11.1.0-next.3","kev":false},{"cve":"CVE-2026-22610","published":"2026-01-10","fixed":"21.1.0-rc.0","kev":false},{"cve":"CVE-2026-27970","published":"2026-02-26","fixed":"21.2.0","kev":false},{"cve":"CVE-2026-50557","published":"2026-06-22","fixed":"22.0.0-rc.2","kev":false},{"cve":"CVE-2026-52725","published":"2026-06-22","fixed":"22.0.0-rc.2","kev":false,"link":{"from":"CVE-2026-50557","to":"CVE-2026-52725","relation":"successor","confidence":"medium","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"npm:@angular/core","fromFixed":"19.2.22","toFixed":"19.2.23","daysApart":0},{"kind":"similar","provenance":"machine","score":0.24,"basis":"same product + CWE + description similarity"}]}},{"cve":"CVE-2026-32635","published":"2026-03-13","fixed":"22.0.0-next.3","kev":false,"link":{"from":"CVE-2026-32635","to":"CVE-2026-50557","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:@angular/core","fromFixed":"21.2.4","toFixed":"21.2.15","daysApart":101},{"kind":"version-step","provenance":"source","package":"npm:@angular/core","fromFixed":"20.3.18","toFixed":"20.3.22","daysApart":101}]}},{"cve":"CVE-2026-54267","published":"2026-06-22","fixed":"22.0.1","kev":false}],"package":"npm:@angular/core"}}