CVE-2026-50557
Angular: Template and Attribute Namespace Sanitization Bypass (XSS)
At a glance
- Source
- NVD
- EPSS
- EPSS 0.41 % · percentile 35 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- GitHub_M
- NVD 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.
Weaknesses (CWE)
- CWE-79 — Improper Neutralization of Input During Web Page Generation
References
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 4.0 | MEDIUM 5.3 | 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_M |
| CVSS 4.0 | MEDIUM 5.3 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X | NVD · security-advisories@github.com (Secondary) |
| CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N | NVD · nvd@nist.gov (Primary) |
Advisories
- GHSA-f3m7-gqxr-g87x — Angular: Template and Attribute Namespace Sanitization Bypass (XSS)
European references
- ENISA EUVD · EUVD-2026-38257
- GCVE · GCVE-0-2026-50557
CERT-FR advisories
- CERTFR-2026-AVI-1165 — Multiples vulnérabilités dans les produits IBM · cert.ssi.gouv.fr
- CERTFR-2026-AVI-0933 — Multiples vulnérabilités dans les produits IBM · cert.ssi.gouv.fr
Affected configurations (NVD CPE)
cpe:2.3:a:angular:angular:*:*:*:*:*:node.js:*:*≤ 18.2.14cpe:2.3:a:angular:angular:*:*:*:*:*:node.js:*:*≥ 19.0.0 < 19.2.22cpe:2.3:a:angular:angular:*:*:*:*:*:node.js:*:*≥ 20.0.0 < 20.3.22cpe:2.3:a:angular:angular:*:*:*:*:*:node.js:*:*≥ 21.0.0 < 21.2.15cpe:2.3:a:angular:angular:22.0.0:next0:*:*:*:node.js:*:*cpe:2.3:a:angular:angular:22.0.0:next1:*:*:*:node.js:*:*cpe:2.3:a:angular:angular:22.0.0:next10:*:*:*:node.js:*:*cpe:2.3:a:angular:angular:22.0.0:next11:*:*:*:node.js:*:*cpe:2.3:a:angular:angular:22.0.0:next12:*:*:*:node.js:*:*cpe:2.3:a:angular:angular:22.0.0:next2:*:*:*:node.js:*:*cpe:2.3:a:angular:angular:22.0.0:next3:*:*:*:node.js:*:*cpe:2.3:a:angular:angular:22.0.0:next4:*:*:*:node.js:*:*cpe:2.3:a:angular:angular:22.0.0:next5:*:*:*:node.js:*:*cpe:2.3:a:angular:angular:22.0.0:next6:*:*:*:node.js:*:*cpe:2.3:a:angular:angular:22.0.0:next7:*:*:*:node.js:*:*cpe:2.3:a:angular:angular:22.0.0:next8:*:*:*:node.js:*:*cpe:2.3:a:angular:angular:22.0.0:next9:*:*:*:node.js:*:*cpe:2.3:a:angular:angular:22.0.0:rc0:*:*:*:node.js:*:*cpe:2.3:a:angular:angular:22.0.0:rc1:*:*:*:node.js:*:*
Affected products
| Product | Versions |
|---|---|
| angular · angular | affected >= 21.0.0-next.0 < 21.2.15 ; affected >= 22.0.0-next.0 < 22.0.0-rc.2 ; affected >= 20.0.0-next.0 < 20.3.22 ; affected >= 19.0.0-next.0 < 19.2.22 ; affected <= 18.2.14 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| CERT-FR (ANSSI) | Licence Ouverte / Etalab 2.0 |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |