All vulnerabilities

Servers and applications

CVE-2026-88057

Sanitization bypass via directive host bindings on concrete host elements in @angular/core and @angular/compiler

Severity
Medium 5.3
Published
18 Aug 2026
Last changed
10 Sept 2026
Added to UpHeron
3 Nov 2026
Fixed in
20.3.28, 21.2.20, 22.1.0
Exploit chance
0.4% in the next 30 daysHigher than 31% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Cross-site scripting (CWE-79)
Attack
Over the network · No login needed · Needs someone to view a page or file
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Also known as
GHSA-hh8m-fm6v-7cvg
Sources
Project advisories (GitHub)

Description

Angular automatically sanitizes untrusted values bound to security-sensitive DOM sinks (such as href, src, action, xlink:href, and data) to protect against Cross-Site Scripting (XSS).

Prior to the fix, the Angular compiler determined the SecurityContext for directive host bindings (host: {'[attr.href]': 'value'} or @HostBinding('attr.href')) based solely on the declaring directive or component selector at compile time, rather than the concrete host element that the directive was applied to.

When a directive with a security-sensitive host binding was applied to a different concrete host element—such as through:

  • hostDirectives composition,
  • Class inheritance of host bindings,
  • Dynamic component instantiation (createComponent with custom hostElement or dynamic directives),
  • Elements with SVG/MathML namespaces (e.g. , ), or
  • Elements using tag-neutral selectors (e.g. :not(...)),
From angular/angular's security advisory. Shortened; the full text is there.

Workarounds

Ensure that any user-controlled values assigned to properties bound via directive host bindings are explicitly sanitized using DomSanitizer.sanitize(SecurityContext.URL, ...) before assignment, or restrict the input to validated safe URL schemes (e.g. http://, https://).

Workarounds as given by angular/angular's security advisory.

Affected software

SoftwareAffected versions
AngularServers and applications · github:angular/angular
  • Every version up to 19.2.25
  • From 20.0.0 before 20.3.28
  • From 21.0.0 before 21.2.20
  • From 22.0.0 before 22.1.0

About Angular

web application framework

From Wikidata, CC0 1.0.
Developers who used it in the past year
18.2%Stack Overflow Developer Survey 2025, 2025
Weekly downloads (npm)
8,195,583npm, 15 Nov 2026
GitHub stars
101,504GitHub, 15 Nov 2026
Forks
28,216GitHub, 15 Nov 2026
Latest release
v22.2.6GitHub, 15 Nov 2026
Released
12 Nov 2026GitHub
Developer
GoogleWikidata
License
MIT LicenseWikidata
Written in
TypeScriptWikidata
First released
15 Sept 2016Wikidata
First published on GitHub
18 Sept 2014GitHub

Release lines

ReleaseLatestSecurity fixes
2222.2.6Until 30 Jun 2028
2121.2.26Until 30 Jun 2027
2020.3.35Until 28 Nov 2026
1919.2.25Ended 19 May 2026
1818.2.14Ended 21 Nov 2025
1717.3.12Ended 15 May 2025

From endoflife.date.

References