CVE-2026-22610 — Vulnerability in @angular/core — CVE Details
Angular has XSS Vulnerability via Unsanitized SVG Script Attributes
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.39%). Schedule for your next planned update.
Does your project use an affected @angular/core version?
Paste your package-lock.json to check it for CVE-2026-22610 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
A Cross-Site Scripting (XSS) vulnerability has been identified in the Angular Template Compiler. The vulnerability exists because Angular’s internal sanitization schema fails to recognize the href and xlink:href attributes of SVG <script> elements as a Resource URL context.
In a standard security model, attributes that can load and execute code (like a script's source) should be strictly validated. However, because the compiler does not classify these specific SVG attributes correctly, it allows attackers to bypass Angular's built-in security protections.
When template binding is used to assign user-controlled data to these attributes for example, <script [attr.href]="userInput"> the compiler treats the value as a standard string or a non-sensitive URL rather than a resource link. This enables an attacker to provide a malicious payload, such as a data:text/javascript URI or a link to an external malicious script.
Impact
When successfully exploited, this vulnerability allows for arbitrary JavaScript execution within the context of the victim's browser session. This can lead to:
- Session Hijacking: Stealing session cookies, localStorage data, or authentication tokens.
- Data Exfiltration: Accessing and transmitting sensitive information displayed within the application.
- Unauthorized Actions: Performing state-changing actions (like clicking buttons or submitting forms) on behalf of the authenticated user.
Attack Preconditions
- The victim application must explicitly use SVG
<script>elements within its templates. - The application must use property or attribute binding (interpolation) for the
hreforxlink:hrefattributes of those SVG scripts. - The data bound to these attributes must be derived from an untrusted source (e.g., URL parameters, user-submitted database entries, or unsanitized API responses).
Patches
- 19.2.18
- 20.3.16
- 21.0.7
- 21.1.0-rc.0
Workarounds
Until the patch is applied, developers should:
- Avoid Dynamic Bindings: Do not use Angular template binding (e.g.,
[attr.href]) for SVG<script>elements. - Input Validation: If dynamic values must be used, strictly validate the input against a strict allowlist of trusted URLs on the server side or before it reaches the template.
Resources
Advisory Timeline
- First published January 9, 2026 (321 days ago).
- Last revised September 10, 2026 — 243 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
npm install @angular/core@19.2.18
npm install @angular/core@21.0.7
npm install @angular/compiler@19.2.18
npm install @angular/core@21.1.0-rc.0
npm install @angular/compiler@21.1.0-rc.0
npm install @angular/compiler@21.0.7
npm install @angular/core@20.3.16
npm install @angular/compiler@20.3.16
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (10)
Affects 1 ecosystem: npm (2).
| Package | Fixed In |
|---|---|
| @angular/core npm · Affected: All versions | 19.2.18 |
| @angular/core npm · Affected: All versions | 21.0.7 |
| @angular/compiler npm · Affected: All versions | 19.2.18 |
| @angular/core npm · Affected: All versions | 21.1.0-rc.0 |
| @angular/compiler npm · Affected: All versions | 21.1.0-rc.0 |
| @angular/compiler npm · Affected: All versions | 21.0.7 |
| @angular/core npm · Affected: All versions | 20.3.16 |
| @angular/compiler npm · Affected: All versions | 20.3.16 |
| @angular/core npm · Affected: All versions | Range-based data available |
| @angular/compiler npm · Affected: All versions | Range-based data available |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-79Cross-site Scripting (XSS)MITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 7.7 score means for each attack dimension.
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
References
- https://github.com/angular/angular/security/advisories/GHSA-jrmj-c5cx-3cw6WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-22610ADVISORY
- https://github.com/angular/angular/pull/66318WEB
- https://github.com/angular/angular/commit/91dc91bae4a1bbefc58bef6ef739d0e02ab44d56WEB
- https://cert-portal.siemens.com/productcert/html/ssa-253495.htmlWEB
- https://cert-portal.siemens.com/productcert/html/ssa-485750.htmlWEB
- https://github.com/angular/angularPACKAGE
Frequently Asked Questions
- What is CVE-2026-22610?
- Angular has XSS Vulnerability via Unsanitized SVG Script 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-22610?
- CVE-2026-22610 affects @angular/core and @angular/compiler. It has a 0.4% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-22610 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is a below-median EPSS score — only 24.7% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-41423HIGH
Angular: SSRF via protocol-relative and backslash URLs in Angular Platform-Server
- CVE-2025-66035HIGH
Angular is Vulnerable to XSRF Token Leakage via Protocol-Relative URLs in Angular HTTP Client
- CVE-2026-88056HIGH
Angular: SSRF and Cross-Origin Credential Disclosure via URL Resolution Discrepancy in SSR
- CVE-2026-32635HIGH
Angular vulnerable to XSS in i18n attribute bindings
- CVE-2026-50556HIGH
@angular/platform-server: Missing `<noscript>` Raw-Text Serialization Escaping leads to Cross-Site Scripting (XSS) in Angular SSR
- CVE-2026-88058HIGH
Angular SSR: XSS via Unescaped Processing Instruction (<?...?>) Nodes in Fallback Raw-Content Elements
- CVE-2026-68945HIGH
Angular: Cache-Key Ambiguity in HttpTransferCache Leading to Cross-Request Response Reuse and State Poisoning
- CVE-2026-69151HIGH
Angular i18n: Cross-Site Scripting (XSS) via event-handler attributes