Skip to main content

CVE-2026-22610 — Vulnerability in @angular/core — CVE Details

HIGH

Angular has XSS Vulnerability via Unsanitized SVG Script Attributes

Published January 9, 2026Updated September 10, 2026Source: OSV

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.

Check my package-lock.json

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

  1. The victim application must explicitly use SVG <script> elements within its templates.
  2. The application must use property or attribute binding (interpolation) for the href or xlink:href attributes of those SVG scripts.
  3. 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
Update @angular/core to 19.2.18 or later
npm install @angular/core@19.2.18
npm
Update @angular/core to 21.0.7 or later
npm install @angular/core@21.0.7
npm
Update @angular/compiler to 19.2.18 or later
npm install @angular/compiler@19.2.18
npm
Update @angular/core to 21.1.0-rc.0 or later
npm install @angular/core@21.1.0-rc.0
npm
Update @angular/compiler to 21.1.0-rc.0 or later
npm install @angular/compiler@21.1.0-rc.0
npm
Update @angular/compiler to 21.0.7 or later
npm install @angular/compiler@21.0.7
npm
Update @angular/core to 20.3.16 or later
npm install @angular/core@20.3.16
npm
Update @angular/compiler to 20.3.16 or later
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).

PackageFixed In
@angular/core npm · Affected: All versions19.2.18
@angular/core npm · Affected: All versions21.0.7
@angular/compiler npm · Affected: All versions19.2.18
@angular/core npm · Affected: All versions21.1.0-rc.0
@angular/compiler npm · Affected: All versions21.1.0-rc.0
@angular/compiler npm · Affected: All versions21.0.7
@angular/core npm · Affected: All versions20.3.16
@angular/compiler npm · Affected: All versions20.3.16
@angular/core npm · Affected: All versionsRange-based data available
@angular/compiler npm · Affected: All versionsRange-based data available

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
Low
User Interaction
A
Scope
—
Confidentiality
—
Integrity
—
Availability
—

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

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

CVSS Score
7.7

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
0.39%
EPSS percentile: 24.7

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

GHSA-jrmj-c5cx-3cw6

Related CVEs

  • CVE-2026-41423
    HIGH

    Angular: SSRF via protocol-relative and backslash URLs in Angular Platform-Server

  • CVE-2025-66035
    HIGH

    Angular is Vulnerable to XSRF Token Leakage via Protocol-Relative URLs in Angular HTTP Client

  • CVE-2026-88056
    HIGH

    Angular: SSRF and Cross-Origin Credential Disclosure via URL Resolution Discrepancy in SSR

  • 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-69151
    HIGH

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

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my package-lock.json