# CVE-2026-50557: Angular: Template and Attribute Namespace Sanitization Bypass (XSS)

- Severity: Medium 5.3 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.24%, higher than 16% of CVEs (2026-12-01)
- Published: 2026-06-15T17:21:58.000Z
- Modified: 2026-09-10T03:50:49.282Z
- Also known as: GHSA-f3m7-gqxr-g87x
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- angular angular: >= 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; up to 18.2.14; from 19.0.0 before 19.2.22; from 20.0.0 before 20.3.22; from 21.0.0 before 21.2.15; 22.0.0
- @angular/core (npm): from 21.0.0-next.0 before 21.2.15; from 22.0.0-next.0 before 22.0.0-rc.2; from 20.0.0-next.0 before 20.3.22; from 19.0.0-next.0 before 19.2.22; up to 18.2.14
- @angular/compiler (npm): from 21.0.0-next.0 before 21.2.15; from 22.0.0-next.0 before 22.0.0-rc.2; from 20.0.0-next.0 before 20.3.22; from 19.0.0-next.0 before 19.2.22; up to 18.2.14

## Every score

- GitHub_M: CVSS:4.0 5.3 Medium `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`
- GitHub: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:4.0 Medium `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`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/angular/angular/security/advisories/GHSA-f3m7-gqxr-g87x> (third-party-advisory, web)
- <https://github.com/angular/angular/pull/68689> (issue-tracking, patch, web)
- <https://github.com/angular/angular/pull/68868> (issue-tracking, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-50557> (advisory)
- <https://github.com/angular/angular> (package)

## Sources

- CVE List: [CVE-2026-50557](https://www.cve.org/CVERecord?id=CVE-2026-50557), CVE Terms of Use, modified 2026-06-22
- GitHub Advisory Database: [GHSA-f3m7-gqxr-g87x](https://github.com/advisories/GHSA-f3m7-gqxr-g87x), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-50557](https://nvd.nist.gov/vuln/detail/CVE-2026-50557), Public domain, modified 2026-07-09

---

Page: https://cve.day/CVE-2026-50557 · Whole record: https://cve.day/CVE-2026-50557.json · Rebuilt by cve.day 2026-11-25T22:59:25.369Z
