Skip to content
OpenAdvisories

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 products

VendorProductAffectedFixed
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 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 13 angular.js No fix yet —
Debian 12 angular.js No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 angular.js No fix yet —
Ubuntu 26.04 LTS angular.js No fix yet —
Ubuntu 25.10 angular.js No fix yet —
Ubuntu 24.04 LTS angular.js No fix yet —
Ubuntu 22.04 LTS angular.js No fix yet —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 20.04 LTS angular.js No fix yet —
Ubuntu Pro 18.04 LTS angular.js No fix yet —
Ubuntu Pro 16.04 LTS angular.js No fix yet —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling katib-earlystopping +8 0.19.0-r31 —
Wolfi rolling katib-suggestion-goptuna-compat 0.19.0-r40 —

Affected packages

EcosystemPackageAffectedFixedRecord
npm @angular/compiler >= 21.0.0-next.0, < 21.2.15 21.2.15 GHSA-f3m7-gqxr-g87x
npm @angular/compiler >= 22.0.0-next.0, < 22.0.0-rc.2 22.0.0-rc.2 GHSA-f3m7-gqxr-g87x
npm @angular/compiler >= 20.0.0-next.0, < 20.3.22 20.3.22 GHSA-f3m7-gqxr-g87x
npm @angular/compiler >= 19.0.0-next.0, < 19.2.22 19.2.22 GHSA-f3m7-gqxr-g87x
npm @angular/compiler <= 18.2.14 — GHSA-f3m7-gqxr-g87x
npm @angular/core >= 21.0.0-next.0, < 21.2.15 21.2.15 GHSA-f3m7-gqxr-g87x
npm @angular/core >= 22.0.0-next.0, < 22.0.0-rc.2 22.0.0-rc.2 GHSA-f3m7-gqxr-g87x
npm @angular/core >= 20.0.0-next.0, < 20.3.22 20.3.22 GHSA-f3m7-gqxr-g87x
npm @angular/core >= 19.0.0-next.0, < 19.2.22 19.2.22 GHSA-f3m7-gqxr-g87x
npm @angular/core <= 18.2.14 — GHSA-f3m7-gqxr-g87x

Advisories 1

References