CVE-2026-50557 Details
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.
A vulnerability exists in the Angular framework, specifically in the @angular/compiler and @angular/core packages, prior to versions 22.0.0-rc.2, 21.2.15, 20.3.22, and 19.2.22. This issue allows for bypassing the sanitization and validation of elements and attributes through certain namespace workarounds. Namespaced script elements, such as <svg:script>, were not correctly recognized as script elements by the Angular template preparser. As a result, these elements could pass through template compilation without being removed. Additionally, the security context schema mappings for element attributes inconsistently managed attributes within namespaced elements like SVG and MathML. This created vulnerabilities where malicious namespaced attributes could evade both runtime and compile-time sanitizers. Exploiting this flaw enables an attacker to inject namespaced script elements or dynamic attribute bindings, bypassing Angular's core sanitization measures and leading to client-side Cross-Site Scripting (XSS) attacks.
Users can upgrade to Angular versions 22.0.0-rc.2, 21.2.15, 20.3.22, or 19.2.22 to address this vulnerability.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jun 22, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/angular/angular/pull/68689 | [email protected] | Issue TrackingPatch |
| https://github.com/angular/angular/pull/68868 | [email protected] | Issue Tracking |
| https://github.com/angular/angular/security/advisories/GHSA-f3m7-gqxr-g87x | [email protected] | Third Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| angular angular | <= 18.2.14 >= 19.0.0, < 19.2.22 >= 20.0.0, < 20.3.22 >= 21.0.0, < 21.2.15 22.0.0 next0 22.0.0 next1 22.0.0 next10 22.0.0 next11 22.0.0 next12 22.0.0 next2 22.0.0 next3 22.0.0 next4 22.0.0 next5 22.0.0 next6 22.0.0 next7 22.0.0 next8 22.0.0 next9 22.0.0 rc0 22.0.0 rc1 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 9, 2026 | Reanalysis | [email protected] |
| Jun 26, 2026 | Initial Analysis | [email protected] |
| Jun 22, 2026 | CVE Modified | CISA-ADP |
| Jun 22, 2026 | New CVE Received | [email protected] |