Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @angular/core
  4. ›
  5. CVE-2026-88057

CVE-2026-88057: Angular: Sanitization bypass via directive host bindings on concrete host elements in @angular/core and @angular/compiler

September 10, 2026

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. <svg:a>, <math>), or
  • Elements using tag-neutral selectors (e.g. :not(...)),

the compiler either failed to associate a sanitizer with the host binding or attached an incorrect security context. As a result, untrusted inputs (e.g. javascript:... URLs) bound via the host binding would be written to the DOM attribute without passing through Angular’s built-in sanitizer.

References

  • github.com/advisories/GHSA-hh8m-fm6v-7cvg
  • github.com/angular/angular/commit/2f96c8020f85ccb715a76de4b79a0c680c2c7264
  • github.com/angular/angular/commit/6afe6fa781c2f0931f0aedd729b9884a8fe212ee
  • github.com/angular/angular/commit/6caa298dee58319b2d674dc91364e26ffe3ecb2b
  • github.com/angular/angular/issues/69550
  • github.com/angular/angular/pull/69558
  • github.com/angular/angular/releases/tag/v20.3.28
  • github.com/angular/angular/releases/tag/v21.2.20
  • github.com/angular/angular/releases/tag/v22.1.0
  • github.com/angular/angular/security/advisories/GHSA-hh8m-fm6v-7cvg
  • nvd.nist.gov/vuln/detail/CVE-2026-88057

Code Behaviors & Features

Detect and mitigate CVE-2026-88057 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions up to 19.2.25, all versions starting from 20.0.0 before 20.3.28, all versions starting from 21.0.0 before 21.2.20, all versions starting from 22.0.0 before 22.1.0

Fixed versions

  • 20.3.28
  • 21.2.20
  • 22.1.0

Solution

Upgrade to versions 20.3.28, 21.2.20, 22.1.0 or above.

Impact 5.4 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

npm/@angular/core/CVE-2026-88057.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Fri, 11 Sep 2026 00:18:30 +0000.