Loading...
Skip to main content

CVE-2026-69151 — Vulnerability in @angular/compiler — CVE Details

HIGH

Angular i18n: Cross-Site Scripting (XSS) via event-handler attributes

Published August 3, 2026Updated August 3, 2026Source: osv

Summary

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.

Advisory Timeline

  • First published August 3, 2026 (70 days ago).
  • Last revised August 3, 2026 — 0 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

npm
Update @angular/core to 22.0.1 or later
npm install @angular/core@22.0.1
npm
Update @angular/core to 20.3.27 or later
npm install @angular/core@20.3.27
npm
Update @angular/compiler to 21.2.19 or later
npm install @angular/compiler@21.2.19
npm
Update @angular/compiler to 22.0.1 or later
npm install @angular/compiler@22.0.1
npm
Update @angular/core to 21.2.19 or later
npm install @angular/core@21.2.19
npm
Update @angular/compiler to 20.3.27 or later
npm install @angular/compiler@20.3.27

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (8)

Affects 1 ecosystem: npm (2).

PackageEcosystemAffectedFixed In
@angular/compiler
npm
All versionsRange-based data available
@angular/core
npm
All versions22.0.1
@angular/core
npm
All versions20.3.27
@angular/compiler
npm
All versions21.2.19
@angular/compiler
npm
All versions22.0.1
@angular/core
npm
All versionsRange-based data available
@angular/core
npm
All versions21.2.19
@angular/compiler
npm
All versions20.3.27

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-79
    Cross-site Scripting (XSS)MITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 7.7 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
P
Scope
—
Confidentiality
—
Integrity
—
Availability
—

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

Frequently Asked Questions

What is CVE-2026-69151?
Angular i18n: Cross-Site Scripting (XSS) via event-handler attributes This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.7/10).
How do I check if my project is affected by CVE-2026-69151?
CVE-2026-69151 affects @angular/compiler and @angular/core. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-69151 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
7.7

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-jj27-h5hq-8x99

Related CVEs

  • CVE-2026-27739
    CRITICAL

    Angular SSR is vulnerable to SSRF and Header Injection via request handling pipeline

  • CVE-2026-32635
    HIGH

    Angular vulnerable to XSS in i18n attribute bindings

  • CVE-2026-50556
    HIGH

    @angular/platform-server: Missing `<noscript>` Raw-Text Serialization Escaping leads to Cross-Site Scripting (XSS) in Angular SSR

  • CVE-2026-88058
    HIGH

    Angular SSR: XSS via Unescaped Processing Instruction (<?...?>) Nodes in Fallback Raw-Content Elements

  • CVE-2026-68945
    HIGH

    Angular: Cache-Key Ambiguity in HttpTransferCache Leading to Cross-Request Response Reuse and State Poisoning

  • CVE-2026-22610
    HIGH

    Angular has XSS Vulnerability via Unsanitized SVG Script Attributes

  • CVE-2026-88060
    HIGH

    Angular: SSR XSS via Unescaped <template> Content Across DocumentFragment Boundaries in Fallback Raw-Content Elements

  • CVE-2026-69149
    HIGH

    Angular SSR: Missing Fallback Raw-Content Serialization Escaping leads to Cross-Site Scripting (XSS)

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies