CVE-2026-88057: Angular Core and Compiler - Sanitization Bypass via Directive Host Bindings

@angular/core Updated 10 Sep 2026

Summary

10/09/2026
Yes i
Moderate
5.3

CVE-2026-88057: 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). Affects @angular/core across 4 version ranges.

< 19.2.25 >= 20.0.0, < 20.3.28 >= 21.0.0, < 21.2.20 >= 22.0.0, < 22.1.0

Fixed in 4 releases; the minimum fixed version depends on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Angular is a platform and framework for building single-page client applications using HTML and TypeScript. It provides a robust set of tools for developing dynamic web applications, including a powerful templating engine, dependency injection, and a rich ecosystem of libraries. However, Angular's handling of security-sensitive DOM sinks can be compromised if directives are improperly configured, leading to potential Cross-Site Scripting (XSS) vulnerabilities.

Vulnerability Detail

The vulnerability arises from Angular's method of determining the SecurityContext for directive host bindings, which is based solely on the declaring directive or component selector at compile time. This approach fails to account for the actual host element the directive is applied to, allowing an attacker to exploit this oversight. If a directive with a security-sensitive host binding is applied to an unexpected host element, untrusted inputs can be written directly to the DOM without proper sanitization, potentially enabling arbitrary JavaScript execution in the user's browser context.

How To Fix

Latest published version: 22.2.3 as of 23 Oct 2026

npm install @angular/core@22.2.3

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 19.2.25 19.2.25
    npm install @angular/core@19.2.25
  • >= 20.0.0, < 20.3.28 20.3.28
    npm install @angular/core@20.3.28
  • >= 21.0.0, < 21.2.20 21.2.20
    npm install @angular/core@21.2.20
  • >= 22.0.0, < 22.1.0 22.1.0
    npm install @angular/core@22.1.0

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a temporary workaround, ensure that any user-controlled values assigned to properties bound via directive host bindings are explicitly sanitized using the following code:

import { DomSanitizer, SecurityContext } from '@angular/platform-browser';

constructor(private sanitizer: DomSanitizer) {}

setSafeUrl(value: string) {
  return this.sanitizer.sanitize(SecurityContext.URL, value);
}

Conclusion

CVE-2026-88057 is a significant vulnerability affecting Angular's core and compiler packages, allowing for potential XSS attacks through improper handling of directive host bindings. It is crucial to update to the patched versions or implement the suggested workarounds to mitigate the risk.

See every vulnerability recorded for @angular/core →

Share this vulnerability

FAQ

CVE-2026-88057 is a vulnerability in Angular's core and compiler packages that allows for sanitization bypass via directive host bindings, potentially leading to Cross-Site Scripting (XSS).

An attacker can exploit this vulnerability by controlling the value bound to a directive host binding, allowing them to execute arbitrary JavaScript in the user's browser.

Versions of @angular/core and @angular/compiler prior to 22.1.0, 21.2.20, and 20.3.28 are affected by this vulnerability.

If you cannot update immediately, ensure that any user-controlled values assigned to directive host bindings are sanitized using the DomSanitizer service.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. You can check your application against this vulnerability using the Vulert playground at Vulert Scanner without needing to sign up.

Related vulnerabilities

Recent vulnerabilities recorded for @angular/core.

How To Fix

Latest published version: 22.2.3 as of 23 Oct 2026

npm install @angular/core@22.2.3

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 19.2.25 19.2.25
    npm install @angular/core@19.2.25
  • >= 20.0.0, < 20.3.28 20.3.28
    npm install @angular/core@20.3.28
  • >= 21.0.0, < 21.2.20 21.2.20
    npm install @angular/core@21.2.20
  • >= 22.0.0, < 22.1.0 22.1.0
    npm install @angular/core@22.1.0

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback