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.

Severity (CVSS 4.0)5.3Medium
Exploit odds (30 days)0.4%top 64.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Debian:12angular.jsno fix listedDEBIAN-CVE-2026-50557
Debian:13angular.jsno fix listedDEBIAN-CVE-2026-50557
Ubuntu:22.04:LTSangular.jsno fix listedUBUNTU-CVE-2026-50557
Ubuntu:24.04:LTSangular.jsno fix listedUBUNTU-CVE-2026-50557
Ubuntu:25.10angular.jsno fix listedUBUNTU-CVE-2026-50557
Ubuntu:26.04:LTSangular.jsno fix listedUBUNTU-CVE-2026-50557
Ubuntu:26.10angular.jsno fix listedUBUNTU-CVE-2026-50557
npm@angular/compiler19.2.22GHSA-f3m7-gqxr-g87x
npm@angular/compiler21.2.15GHSA-f3m7-gqxr-g87x
npm@angular/compiler22.0.0-rc.2GHSA-f3m7-gqxr-g87x
npm@angular/compiler20.3.22GHSA-f3m7-gqxr-g87x
npm@angular/compilerno fix listedGHSA-f3m7-gqxr-g87x
npm@angular/core21.2.15GHSA-f3m7-gqxr-g87x
npm@angular/coreno fix listedGHSA-f3m7-gqxr-g87x
npm@angular/core19.2.22GHSA-f3m7-gqxr-g87x
npm@angular/core20.3.22GHSA-f3m7-gqxr-g87x
npm@angular/core22.0.0-rc.2GHSA-f3m7-gqxr-g87x

Affected products (as reported)

VendorProductVersions
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

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