CVE-2026-50557
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
@angular/corenpm | >= 21.0.0-next.0, < 21.2.15 | 21.2.15 |
@angular/corenpm | >= 22.0.0-next.0, < 22.0.0-rc.2 | 22.0.0-rc.2 |
@angular/corenpm | >= 20.0.0-next.0, < 20.3.22 | 20.3.22 |
@angular/corenpm | >= 19.0.0-next.0, < 19.2.22 | 19.2.22 |
@angular/corenpm | <= 18.2.14 | — |
@angular/compilernpm | >= 21.0.0-next.0, < 21.2.15 | 21.2.15 |
@angular/compilernpm | >= 22.0.0-next.0, < 22.0.0-rc.2 | 22.0.0-rc.2 |
@angular/compilernpm | >= 20.0.0-next.0, < 20.3.22 | 20.3.22 |
@angular/compilernpm | >= 19.0.0-next.0, < 19.2.22 | 19.2.22 |
@angular/compilernpm | <= 18.2.14 | — |
Affected products
23<= 18.2.14+ 16 more
- (no CPE)range: <= 18.2.14
- cpe:2.3:a:angular:angular:*:*:*:*:*:node.js:*:*range: <=18.2.14
- cpe:2.3:a:angular:angular:22.0.0:next0:*:*:*: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:next1:*:*:*: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:*:*
- osv-coords6 versionspkg:apk/chainguard/katib-earlystoppingpkg:apk/chainguard/katib-suggestion-hyperbandpkg:apk/chainguard/katib-suggestion-optuna-enaspkg:apk/wolfi/katib-earlystoppingpkg:apk/wolfi/katib-suggestion-hyperbandpkg:apk/wolfi/katib-suggestion-optuna-enas
< 0.19.0-r31+ 5 more
- (no CPE)range: < 0.19.0-r31
- (no CPE)range: < 0.19.0-r31
- (no CPE)range: < 0.19.0-r31
- (no CPE)range: < 0.19.0-r31
- (no CPE)range: < 0.19.0-r31
- (no CPE)range: < 0.19.0-r31
Patches
Vulnerability mechanics
References
5- github.com/angular/angular/pull/68689nvdIssue TrackingPatchWEB
- github.com/advisories/GHSA-f3m7-gqxr-g87xghsaADVISORY
- github.com/angular/angular/security/advisories/GHSA-f3m7-gqxr-g87xnvdThird Party AdvisoryWEB
- nvd.nist.gov/vuln/detail/CVE-2026-50557ghsaADVISORY
- github.com/angular/angular/pull/68868nvdIssue TrackingWEB
News mentions
1- Angular: 14 CVEs Disclosed Across Core Packages — XSS, DoS, SSRF, and Cache PoisoningVypr Intelligence · Jun 15, 2026