CVE-2026-69151: Angular i18n Cross-Site Scripting Vulnerability

HIGH
Advisory Identifier: GHSA-jj27-h5hq-8x99
CWE-79
Published
Advisory Summary

CVE-2026-69151 is a HIGH cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Angular i18n libraries in the npm ecosystem. The issue involves cross-site scripting (xss) via event-handler attributes. Remediation is available by upgrading affected packages to version 22.0.1, 21.2.19, 20.3.27.

CVE-2026-69151 at a Glance

CVE Identifier CVE-2026-69151
GHSA Identifier GHSA-jj27-h5hq-8x99
Severity HIGH
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 i18n
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-69151

To remediate this vulnerability, upgrade all affected Angular i18n 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/compiler fixed: 22.0.1
npm install @angular/compiler@22.0.1
@angular/compiler fixed: 21.2.19
npm install @angular/compiler@21.2.19
@angular/compiler fixed: 20.3.27
npm install @angular/compiler@20.3.27
@angular/compiler fixed: Latest secure release
npm install @angular/compiler@Latest secure release
@angular/core fixed: 22.0.1
npm install @angular/core@22.0.1
@angular/core fixed: 21.2.19
npm install @angular/core@21.2.19
@angular/core fixed: 20.3.27
npm install @angular/core@20.3.27
@angular/core fixed: Latest secure release
npm install @angular/core@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/compiler

How to Check if You Are Affected

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

npm ls @angular/compiler

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

Note: The npm ls @angular/compiler 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 i18n, 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

A Cross-Site Scripting (XSS) vulnerability has been identified in the Angular compiler's internationalization (i18n) pipeline. Although Angular disallows binding to event-handler attributes such as `onclick` and `onerror` through standard attribute validation (`validateAttribute()` / `validateProperty()`), the i18n metadata collection path allowed these same attribute names to be marked for translation using `i18n-on*` attributes (e.g., `i18n-onerror`). When exploited, a lower-trust translation file could replace a benign static handler such as `onerror="void 0"` with arbitrary executable JavaScript in the localized build. The following example illustrates a vulnerable pattern: ```html <img src="foo.jpg" onerror="void 0" i18n-onerror /> ``` ### Impact When exploited, this vulnerability allows arbitrary JavaScript execution within the context of the vulnerable application's domain if an attacker can control or influence the translation files used during localization. This can lead to: - **Session Hijacking**: Accessing session cookies, tokens, or sensitive user data. - **Unauthorized Actions**: Performing actions on behalf of the authenticated user. ### Patched Versions - 22.0.1 - 21.2.19 - 20.3.27 ### Workarounds Ensure that static event-handler attributes (e.g., `onerror`, `onclick`) are never marked for internationalization (`i18n-on*`) in application templates, and ensure translation files are sourced from trusted origins.

CVE-2026-69151 Affected Angular i18n Versions

8 component(s)
Fixed Versions:
22.0.121.2.1920.3.27
Product / Package Ecosystem Affected Versions Fixed Version
@angular/compiler
npm
≥ 22.0.0-next.0
< 22.0.1
22.0.1
@angular/compiler
npm
≥ 21.0.0-next.0
< 21.2.19
21.2.19
@angular/compiler
npm
≥ 20.0.0-next.0
< 20.3.27
20.3.27
@angular/compiler
npm
≤ 19.2.25
@angular/core
npm
≥ 22.0.0-next.0
< 22.0.1
22.0.1
@angular/core
npm
≥ 21.0.0-next.0
< 21.2.19
21.2.19
@angular/core
npm
≥ 20.0.0-next.0
< 20.3.27
20.3.27
@angular/core
npm
≤ 19.2.25

References

Frequently Asked Questions

What is CVE-2026-69151?
CVE-2026-69151 is a security vulnerability in Angular i18n involving Cross-Site Scripting (XSS) via event-handler attributes under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Angular i18n versions are affected?
Affected versions include releases prior to 22.0.1, 21.2.19, 20.3.27 across affected packages: @angular/compiler, @angular/core.
What version fixes CVE-2026-69151?
Upgrading to 22.0.1, 21.2.19, 20.3.27 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @angular/compiler affected?
Yes, @angular/compiler is affected in releases prior to 22.0.1, 21.2.19, 20.3.27, Latest secure release. Upgrade your dependency to 22.0.1, 21.2.19, 20.3.27, Latest secure release or later.
Is @angular/core affected?
Yes, @angular/core is affected in releases prior to 22.0.1, 21.2.19, 20.3.27, Latest secure release. Upgrade your dependency to 22.0.1, 21.2.19, 20.3.27, Latest secure release or later.
What CWE is associated with CVE-2026-69151?
CVE-2026-69151 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-69151?
Run the dependency tree command: 'npm ls @angular/compiler'. 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-jj27-h5hq-8x99",
  "modified" : "2026-08-03T16:23:40Z",
  "published" : "2026-08-03T16:23:40Z",
  "aliases" : [ "CVE-2026-69151" ],
  "summary" : "Angular i18n: Cross-Site Scripting (XSS) via event-handler attributes",
  "details" : "A Cross-Site Scripting (XSS) vulnerability has been identified in the Angular compiler's internationalization (i18n) pipeline. Although Angular disallows binding to event-handler attributes such as `onclick` and `onerror` through standard attribute validation (`validateAttribute()` / `validateProperty()`), the i18n metadata collection path allowed these same attribute names to be marked for translation using `i18n-on*` attributes (e.g., `i18n-onerror`).\n\nWhen exploited, a lower-trust translation file could replace a benign static handler such as `onerror=\"void 0\"` with arbitrary executable JavaScript in the localized build.\n\nThe following example illustrates a vulnerable pattern:\n```html\n<img src=\"foo.jpg\" onerror=\"void 0\" i18n-onerror />\n```\n\n### Impact\n\nWhen exploited, this vulnerability allows arbitrary JavaScript execution within the context of the vulnerable application's domain if an attacker can control or influence the translation files used during localization. This can lead to:\n- **Session Hijacking**: Accessing session cookies, tokens, or sensitive user data.\n- **Unauthorized Actions**: Performing actions on behalf of the authenticated user.\n\n### Patched Versions\n\n- 22.0.1\n- 21.2.19\n- 20.3.27\n\n### Workarounds\n\nEnsure that static event-handler attributes (e.g., `onerror`, `onclick`) are never marked for internationalization (`i18n-on*`) in application templates, and ensure translation files are sourced from trusted origins.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@angular/compiler"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "22.0.0-next.0"
      }, {
        "fixed" : "22.0.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@angular/compiler"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "21.0.0-next.0"
      }, {
        "fixed" : "21.2.19"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@angular/compiler"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "20.0.0-next.0"
      }, {
        "fixed" : "20.3.27"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@angular/compiler"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "19.2.25"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@angular/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "22.0.0-next.0"
      }, {
        "fixed" : "22.0.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@angular/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "21.0.0-next.0"
      }, {
        "fixed" : "21.2.19"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@angular/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "20.0.0-next.0"
      }, {
        "fixed" : "20.3.27"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@angular/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "19.2.25"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/angular/angular/security/advisories/GHSA-jj27-h5hq-8x99"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/angular/angular/pull/68821"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/angular/angular/pull/69306"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/angular/angular/commit/417a4071a776464d549509ed3aec121dbd2fda5e"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/angular/angular/commit/6c41f5ca01c0ae045fc7d929b72853a11eb55865"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/angular/angular"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-03T16:23:40Z",
    "nvd_published_at" : null
  }
}