CVE-2026-88057

CVE-2026-88057 is a medium-severity cross-site scripting (XSS) vulnerability in @angular/core (npm), affecting versions >= 22.0.0, < 22.1.0. It is fixed in 22.1.0, 21.2.20, 20.3.28.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

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

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.

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://).

Impact

An attacker capable of controlling the value bound to an affected directive host binding could execute arbitrary JavaScript in the user's browser context (Cross-Site Scripting).

Untrusted input is rendered as active markup in a victim's browser, which can run script in their session. Typical impact: session or credential theft, and actions taken as the user.

Affected versions

@angular/core (>= 22.0.0, < 22.1.0) @angular/compiler (>= 22.0.0, < 22.1.0) @angular/core (>= 21.0.0, < 21.2.20) @angular/compiler (>= 21.0.0, < 21.2.20) @angular/core (>= 20.0.0, < 20.3.28) @angular/compiler (>= 20.0.0, < 20.3.28) @angular/core (<= 19.2.25) @angular/compiler (<= 19.2.25)

Security releases

@angular/core → 22.1.0 (npm) @angular/compiler → 22.1.0 (npm) @angular/core → 21.2.20 (npm) @angular/compiler → 21.2.20 (npm) @angular/core → 20.3.28 (npm) @angular/compiler → 20.3.28 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

This issue has been resolved in versions:

  • 22.1.0
  • 21.2.20
  • 20.3.28

Frequently Asked Questions

  1. What is CVE-2026-88057? CVE-2026-88057 is a medium-severity cross-site scripting (XSS) vulnerability in @angular/core (npm), affecting versions >= 22.0.0, < 22.1.0. It is fixed in 22.1.0, 21.2.20, 20.3.28. Untrusted input is rendered as active markup in a victim's browser, which can run script in their session.
  2. Which packages are affected by CVE-2026-88057?
    • @angular/core (npm) (versions >= 22.0.0, < 22.1.0)
    • @angular/compiler (npm) (versions >= 22.0.0, < 22.1.0)
  3. Is there a fix for CVE-2026-88057? Yes. CVE-2026-88057 is fixed in 22.1.0, 21.2.20, 20.3.28. Upgrade to this version or later.
  4. Is CVE-2026-88057 exploitable, and should I be worried? Whether CVE-2026-88057 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether CVE-2026-88057 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix CVE-2026-88057?
    • Upgrade @angular/core to 22.1.0 or later
    • Upgrade @angular/compiler to 22.1.0 or later
    • Upgrade @angular/core to 21.2.20 or later
    • Upgrade @angular/compiler to 21.2.20 or later
    • Upgrade @angular/core to 20.3.28 or later
    • Upgrade @angular/compiler to 20.3.28 or later

Stop the waste.
Protect your environment with Kodem.