Vulnerability · Published Jun 22, 2026 · Assigned by GitHub_M
CVE-2026-50557Angular: Template and Attribute Namespace Sanitization Bypass (XSS)
Medium 5.3
In plain English
A medium-severity cross-site scripting in angular from angular. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 36% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | angular.js | no fix listed | DEBIAN-CVE-2026-50557 |
| Debian:13 | angular.js | no fix listed | DEBIAN-CVE-2026-50557 |
| Ubuntu:22.04:LTS | angular.js | no fix listed | UBUNTU-CVE-2026-50557 |
| Ubuntu:24.04:LTS | angular.js | no fix listed | UBUNTU-CVE-2026-50557 |
| Ubuntu:25.10 | angular.js | no fix listed | UBUNTU-CVE-2026-50557 |
| Ubuntu:26.04:LTS | angular.js | no fix listed | UBUNTU-CVE-2026-50557 |
| Ubuntu:26.10 | angular.js | no fix listed | UBUNTU-CVE-2026-50557 |
| npm | @angular/compiler | 19.2.22 | GHSA-f3m7-gqxr-g87x |
| npm | @angular/compiler | 21.2.15 | GHSA-f3m7-gqxr-g87x |
| npm | @angular/compiler | 22.0.0-rc.2 | GHSA-f3m7-gqxr-g87x |
| npm | @angular/compiler | 20.3.22 | GHSA-f3m7-gqxr-g87x |
| npm | @angular/compiler | no fix listed | GHSA-f3m7-gqxr-g87x |
| npm | @angular/core | 21.2.15 | GHSA-f3m7-gqxr-g87x |
| npm | @angular/core | no fix listed | GHSA-f3m7-gqxr-g87x |
| npm | @angular/core | 19.2.22 | GHSA-f3m7-gqxr-g87x |
| npm | @angular/core | 20.3.22 | GHSA-f3m7-gqxr-g87x |
| npm | @angular/core | 22.0.0-rc.2 | GHSA-f3m7-gqxr-g87x |
Affected products (as reported)
Weakness: CWE-79 · 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
References
- https://github.com/angular/angular/security/advisories/GHSA-f3m7-gqxr-g87x x_refsource_CONFIRM
- https://github.com/angular/angular/pull/68689 x_refsource_MISC
- https://github.com/angular/angular/pull/68868 x_refsource_MISC