{"cve":"CVE-2026-50557","nvd":{"published":"2026-06-22T16:16:38.050","modified":"2026-07-09T15:40:45.797","status":"Analyzed","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.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.","cvss_v4":{"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","score":5.3},"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1},"cwes":["CWE-79"],"references":["https://github.com/angular/angular/pull/68689","https://github.com/angular/angular/pull/68868","https://github.com/angular/angular/security/advisories/GHSA-f3m7-gqxr-g87x"],"products":["angular:angular"],"source":"nvd","synced_at":"2026-10-19T22:39:28.638635428+00:00"},"epss":{"cve":"CVE-2026-50557","score":0.00411,"percentile":0.35412,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-f3m7-gqxr-g87x","url":"https://osv.dev/vulnerability/GHSA-f3m7-gqxr-g87x","summary":"Angular: Template and Attribute Namespace Sanitization Bypass (XSS)","modified":"2026-09-10T03:50:49.282552968Z","packages":[{"ecosystem":"npm","name":"@angular/core","purl":"pkg:npm/%40angular/core","ranges":[">=21.0.0-next.0 <21.2.15"],"fixed":["21.2.15"]},{"ecosystem":"npm","name":"@angular/core","purl":"pkg:npm/%40angular/core","ranges":[">=22.0.0-next.0 <22.0.0-rc.2"],"fixed":["22.0.0-rc.2"]},{"ecosystem":"npm","name":"@angular/core","purl":"pkg:npm/%40angular/core","ranges":[">=20.0.0-next.0 <20.3.22"],"fixed":["20.3.22"]},{"ecosystem":"npm","name":"@angular/core","purl":"pkg:npm/%40angular/core","ranges":[">=19.0.0-next.0 <19.2.22"],"fixed":["19.2.22"]},{"ecosystem":"npm","name":"@angular/core","purl":"pkg:npm/%40angular/core","ranges":["<=18.2.14"],"fixed":[]},{"ecosystem":"npm","name":"@angular/compiler","purl":"pkg:npm/%40angular/compiler","ranges":[">=21.0.0-next.0 <21.2.15"],"fixed":["21.2.15"]},{"ecosystem":"npm","name":"@angular/compiler","purl":"pkg:npm/%40angular/compiler","ranges":[">=22.0.0-next.0 <22.0.0-rc.2"],"fixed":["22.0.0-rc.2"]},{"ecosystem":"npm","name":"@angular/compiler","purl":"pkg:npm/%40angular/compiler","ranges":[">=20.0.0-next.0 <20.3.22"],"fixed":["20.3.22"]},{"ecosystem":"npm","name":"@angular/compiler","purl":"pkg:npm/%40angular/compiler","ranges":[">=19.0.0-next.0 <19.2.22"],"fixed":["19.2.22"]},{"ecosystem":"npm","name":"@angular/compiler","purl":"pkg:npm/%40angular/compiler","ranges":["<=18.2.14"],"fixed":[]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}