Cross-Site Scripting (XSS) in @angular/compiler (CVE-2026-69151)
Summary
Cross-site scripting in @angular/compiler (CVE-2026-69151). Risk of unauthorized operations or information disclosure. Exploitable via onclick.
Original description
The description as published by the source.
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:
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.
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-69151 has been found in @angular/compiler.
Attackers can target a specific entry point like onclick over the network to misuse the product.
Risk of unauthorized operations or information disclosure. CVSS score: 6.1/10.
What to do: apply the vendor's official patched release.
If unsure, ask your IT team or search "@angular/compiler CVE-2026-69151" on the vendor's site.
CVE-2026-69151 (@angular/compiler) — CWE-79 / CVSS v3 6.1
Attack vector: remote (network-reachable) / unauthenticated
Attack surface: onclick / onerror
Workaround: 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.
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Cross-site scripting (XSS) (CWE-79) exists in @angular/compiler. Attackers reach the vulnerable code path via onclick without authentication.
Check the vendor advisory for the affected versions of @angular/compiler. Attack surface: onclick / onerror.
Severity: Medium (CVSS 6.1/10). Risk of unauthorized operations or information disclosure.
Update to the patched release per vendor advisory.
Workaround: 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.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r '@angular/compiler' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r '@angular/compiler' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
@angular/compilerを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply temporary workaround mitigate
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.パッチが適用されるまでの応急処置として、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. を実施。回避策の副作用 (機能低下) を確認した上で。 -
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com