CVE-2026-22610

Angular has XSS Vulnerability via Unsanitized SVG Script Attributes

Published Jan 10, 2026 CVSS 4.0 · 8.5 High EPSS < 1% KEV · Not listed
Description
Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages. Prior to versions 19.2.18, 20.3.16, 21.0.7, and 21.1.0-rc.0, 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. This issue has been patched in versions 19.2.18, 20.3.16, 21.0.7, and 21.1.0-rc.0.

Analysis

AI-generated

Technical impact

Angular’s Template Compiler misclassifies the href and xlink:href attributes of SVG <script> elements as unrestricted URLs. As a result, a malicious SVG file can embed arbitrary script code that will execute within the context of the page rendered by Angular. This flaw constitutes a classic script‑execution vulnerability, reflected by its assignment to CWE‑79.

Affected Systems

The vulnerability affects Angular versions earlier than 19.2.18, 20.3.16, 21.0.7, and 21.1.0‑rc.0. Applications built with any of those releases are at risk until the framework is updated to a patched version. The issue is independent of the underlying Node.js version, as the associated CPE strings show Angular as the primary component.

Risk and Exploitability

The CVSS score of 8.5 indicates high severity, while the EPSS score of less than 1 % suggests a very low current exploitation probability. The vulnerability is not listed in the CISA KEV catalog. Exploitability requires an attacker to supply a malicious SVG file that Angular renders; based on the description, it is inferred that the attacker would need to deliver such SVG content, typically through user‑supplied input or injection into a page that the application renders.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Angular to version 19.2.18, 20.3.16, 21.0.7, 21.1.0‑rc.0, or any newer release that includes the template‑compiler fix.
  • If an immediate upgrade is not possible, inspect application code for SVG <script> tags, and remove or encode href and xlink:href attributes before rendering, or apply Angular’s DomSanitizer utilities to sanitize the content.
  • Deploy a strict Content Security Policy that blocks inline scripts and restricts script sources to trusted origins, adding an extra layer of protection while the underlying framework is updated.

Generated by OpenCVE AI on April 18, 2026 at 19:16 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-jrmj-c5cx-3cw6 Angular has XSS Vulnerability via Unsanitized SVG Script Attributes
History
Type Values Removed Values Added
CPEs cpe:2.3:a:angular:angular:*:*:*:*:*:node.js:*:*
cpe:2.3:a:angular:angular:21.1.0:next0:*:*:*:node.js:*:*
cpe:2.3:a:angular:angular:21.1.0:next1:*:*:*:node.js:*:*
cpe:2.3:a:angular:angular:21.1.0:next2:*:*:*:node.js:*:*
cpe:2.3:a:angular:angular:21.1.0:next3:*:*:*:node.js:*:*
cpe:2.3:a:angular:angular:21.1.0:next4:*:*:*:node.js:*:*
Metrics cvssV3_1

{'score': 7.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N'}

cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N'}

threat_severity

Moderate

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Angular
Angular angular
Vendors & Products Angular
Angular angular
Type Values Removed Values Added
Description Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages. Prior to versions 19.2.18, 20.3.16, 21.0.7, and 21.1.0-rc.0, 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. This issue has been patched in versions 19.2.18, 20.3.16, 21.0.7, and 21.1.0-rc.0.
Title Angular has XSS Vulnerability via Unsanitized SVG Script Attributes
Weaknesses CWE-79
References
Metrics cvssV4_0

{'score': 8.5, 'vector': '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'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jun 2, 2026, 1:00 PM
Reserved
Jan 7, 2026, 9:50 PM
Status
Modified
Published
Jan 10, 2026, 4:16 AM
Modified
Jun 17, 2026, 10:20 AM
Severity
Moderate
Public date
Jan 10, 2026, 3:35 AM