CVE-2026-88057: Angular Sanitization Bypass Vulnerability

MODERATE
Advisory Identifier: GHSA-hh8m-fm6v-7cvg
CWE-79
Published
Advisory Summary

CVE-2026-88057 is a MODERATE sanitization bypass vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Angular libraries in the npm ecosystem. The issue involves sanitization bypass via directive host bindings on concrete host elements in @angular/core and @angular/compiler. Remediation is available by upgrading affected packages to version 22.1.0, 21.2.20, 20.3.28.

CVE-2026-88057 at a Glance

CVE Identifier CVE-2026-88057
GHSA Identifier GHSA-hh8m-fm6v-7cvg
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Angular
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-88057

To remediate this vulnerability, upgrade all affected Angular dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@angular/core fixed: 22.1.0
npm install @angular/core@22.1.0
@angular/compiler fixed: 22.1.0
npm install @angular/compiler@22.1.0
@angular/core fixed: 21.2.20
npm install @angular/core@21.2.20
@angular/compiler fixed: 21.2.20
npm install @angular/compiler@21.2.20
@angular/core fixed: 20.3.28
npm install @angular/core@20.3.28
@angular/compiler fixed: 20.3.28
npm install @angular/compiler@20.3.28
@angular/core fixed: Latest secure release
npm install @angular/core@Latest secure release
@angular/compiler fixed: Latest secure release
npm install @angular/compiler@Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @angular/core

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-88057, inspect your project dependencies using npm:

npm ls @angular/core

Analyze the terminal output to locate any version of Angular in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 22.1.0), your application is affected.

Note: The npm ls @angular/core command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Angular, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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. ### 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). ### Patches This issue has been resolved in versions: - `22.1.0` - `21.2.20` - `20.3.28` ### 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://`).

CVE-2026-88057 Affected Angular Versions

8 component(s)
Fixed Versions:
22.1.021.2.2020.3.28
Product / Package Ecosystem Affected Versions Fixed Version
@angular/core
npm
≥ 22.0.0
< 22.1.0
22.1.0
@angular/compiler
npm
≥ 22.0.0
< 22.1.0
22.1.0
@angular/core
npm
≥ 21.0.0
< 21.2.20
21.2.20
@angular/compiler
npm
≥ 21.0.0
< 21.2.20
21.2.20
@angular/core
npm
≥ 20.0.0
< 20.3.28
20.3.28
@angular/compiler
npm
≥ 20.0.0
< 20.3.28
20.3.28
@angular/core
npm
≤ 19.2.25
@angular/compiler
npm
≤ 19.2.25

References

Frequently Asked Questions

What is CVE-2026-88057?
CVE-2026-88057 is a security vulnerability in Angular involving Sanitization bypass via directive host bindings on concrete host elements in @angular/core and @angular/compiler under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Angular versions are affected?
Affected versions include releases prior to 22.1.0, 21.2.20, 20.3.28 across affected packages: @angular/core, @angular/compiler.
What version fixes CVE-2026-88057?
Upgrading to 22.1.0, 21.2.20, 20.3.28 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @angular/core affected?
Yes, @angular/core is affected in releases prior to 22.1.0, 21.2.20, 20.3.28, Latest secure release. Upgrade your dependency to 22.1.0, 21.2.20, 20.3.28, Latest secure release or later.
Is @angular/compiler affected?
Yes, @angular/compiler is affected in releases prior to 22.1.0, 21.2.20, 20.3.28, Latest secure release. Upgrade your dependency to 22.1.0, 21.2.20, 20.3.28, Latest secure release or later.
What CWE is associated with CVE-2026-88057?
CVE-2026-88057 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check npm dependencies for CVE-2026-88057?
Run the dependency tree command: 'npm ls @angular/core'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-hh8m-fm6v-7cvg",
  "modified" : "2026-09-10T20:18:03Z",
  "published" : "2026-09-10T20:18:02Z",
  "aliases" : [ "CVE-2026-88057" ],
  "summary" : "Angular: Sanitization bypass via directive host bindings on concrete host elements in @angular/core and @angular/compiler",
  "details" : "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).\n\nPrior 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.\n\nWhen a directive with a security-sensitive host binding was applied to a different concrete host element—such as through:\n- `hostDirectives` composition,\n- Class inheritance of host bindings,\n- Dynamic component instantiation (`createComponent` with custom `hostElement` or dynamic directives),\n- Elements with SVG/MathML namespaces (e.g. `<svg:a>`, `<math>`), or\n- Elements using tag-neutral selectors (e.g. `:not(...)`),\n\nthe 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.\n\n### Impact\nAn 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).\n\n### Patches\nThis issue has been resolved in versions:\n- `22.1.0` \n- `21.2.20`\n- `20.3.28`\n\n### Workarounds\nEnsure 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://`).",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@angular/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "22.0.0"
      }, {
        "fixed" : "22.1.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@angular/compiler"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "22.0.0"
      }, {
        "fixed" : "22.1.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@angular/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "21.0.0"
      }, {
        "fixed" : "21.2.20"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@angular/compiler"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "21.0.0"
      }, {
        "fixed" : "21.2.20"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@angular/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "20.0.0"
      }, {
        "fixed" : "20.3.28"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@angular/compiler"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "20.0.0"
      }, {
        "fixed" : "20.3.28"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@angular/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "19.2.25"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@angular/compiler"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "19.2.25"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/angular/angular/security/advisories/GHSA-hh8m-fm6v-7cvg"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/angular/angular/issues/69550"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/angular/angular/pull/69558"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/angular/angular/commit/2f96c8020f85ccb715a76de4b79a0c680c2c7264"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/angular/angular/commit/6afe6fa781c2f0931f0aedd729b9884a8fe212ee"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/angular/angular/commit/6caa298dee58319b2d674dc91364e26ffe3ecb2b"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/angular/angular"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/angular/angular/releases/tag/v20.3.28"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/angular/angular/releases/tag/v21.2.20"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/angular/angular/releases/tag/v22.1.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-10T20:18:02Z",
    "nvd_published_at" : null
  }
}