Angular
CVE-2026-22610
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify Angular app binding SVG script href
-
DeliveryInject malicious URL via user input
-
ExploitVictim loads vulnerable view
-
ExecutionAngular emits weak URL sanitizer
-
PersistBrowser fetches/executes attacker script
-
ImpactSteal tokens and perform actions as user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires three concrete prerequisites confirmed by the vendor advisory: (1) the target Angular application must explicitly include SVG <script> elements inside its component templates; (2) the application must use Angular property/attribute binding (e.g., [attr.href]="…" or [attr.xlink:href]="…") on those SVG script attributes rather than static strings; and (3) the bound value must derive from an untrusted source such as URL query parameters, form input, database entries, or third-party API responses. Exploitation is further limited by the CVSS UI:A requirement (a victim must actively load the page rendering the malicious SVG script) and PR:L (the attacker needs at least low-privilege ability to inject content into the application's data flow, e.g., as a registered user). The flaw is in the Angular framework itself, so applications on patched versions or applications that simply do not bind to SVG <script> href/xlink:href - which is the overwhelming majority - are not exploitable regardless of other configuration. |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:H) yields a base score of 8.5, reflecting network reach, low complexity, low-privileged attacker, and required active user interaction with high confidentiality/integrity/availability impact on the vulnerable component. However, EPSS is only 0.01% (2nd percentile), there is no CISA KEV listing, and no public exploit identified at time of analysis - signals that argue against opportunistic mass exploitation. The realistic risk is moderate and highly conditional: it depends on an application explicitly using SVG <script> elements with dynamic bindings to untrusted data, which is an uncommon Angular pattern. The PR:L requirement appears to reflect that an attacker typically needs the ability to submit data into the application (a normal authenticated user role in many apps) rather than admin access, while UI:A means a victim must load the affected view. Note the apparent conflict between the CVSS "high" rating and the very low EPSS - this is typical for framework-level XSS where exploitability depends on downstream consumer code, so prioritization should be driven by whether your Angular app actually binds to SVG script attributes. |
| Exploit ScenarioDerived | An attacker submits a malicious payload (such as a data:text/javascript URI or a URL pointing to an attacker-controlled external script) into an input field, URL parameter, or API response that the target Angular application binds into the href or xlink:href attribute of an SVG <script> element. When a victim user navigates to the affected page, Angular emits the URL with the weaker non-resource sanitizer, the browser loads and executes the attacker's JavaScript in the victim's session, enabling cookie/token theft, data exfiltration, and unauthorized state-changing actions on the user's behalf. No public exploit identified at time of analysis, but the patched test case in the commit diff demonstrates the precise vulnerable binding pattern. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv3 – Jun 02, 2026
Cross-site scripting in Angular's Template Compiler allows attackers to inject arbitrary JavaScript through unsanitized href and xlink:href attributes on SVG <script> elements bound to untrusted data. Affects Angular versions prior to 19.2.18, 20.3.16, 21.0.7, and 21.1.0-rc.0, with no public exploit identified at time of analysis despite a very low EPSS score of 0.01%. Patched releases are available from the Angular project, and exploitation requires the victim application to dynamically bind user-controlled values to those specific SVG script attributes.
Earlier versions of this analysis (2)
Cross-site scripting in Angular's Template Compiler allows attackers to execute arbitrary JavaScript by injecting untrusted data into the href or xlink:href attributes of SVG <script> elements. Affected versions span Angular prior to 19.2.18, 20.3.16, 21.0.7, and 21.1.0-rc.0, where the internal sanitization schema fails to classify these SVG script attributes as Resource URL contexts. No public exploit identified at time of analysis, and EPSS is low (0.01%), but the flaw is confirmed via a GitHub Security Advisory (GHSA-jrmj-c5cx-3cw6) with a vendor patch released.
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. [CVSS 6.1 MEDIUM]
RemediationAI
Vendor-released patches are available: upgrade @angular/core and @angular/compiler to 19.2.18, 20.3.16, 21.0.7, or 21.1.0-rc.0 depending on the release line in use, as documented in https://github.com/angular/angular/security/advisories/GHSA-jrmj-c5cx-3cw6 and the fixing commit https://github.com/angular/angular/commit/91dc91bae4a1bbefc58bef6ef739d0e02ab44d56. As a workaround until upgrading, avoid using Angular template property/attribute binding (e.g., [attr.href], [attr.xlink:href]) on SVG <script> elements entirely - refactor templates to use static script references or non-SVG script loading patterns, with the trade-off of losing any dynamic SVG scripting behavior. If dynamic values must be used, strictly validate them server-side against an allowlist of trusted URLs before they reach the template, accepting that allowlist maintenance and false-rejections are the trade-off. Siemens customers should additionally review SSA-253495 and SSA-485750 for product-specific guidance.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Angular is a TypeScript/JavaScript framework for building single-page web applications, and its Template Compiler is responsible for transforming HTML templates into rendering instructions that include automatic sanitization wrappers. The root cause is a CWE-79 (Improper Neutralization of Input During Web Page Generation) flaw in the compiler's DOM security schema (dom_security_schema.ts) and runtime sanitization logic (sanitization.ts), which only treated href on base/link and src on embed/frame/iframe/media/script as Resource URL contexts. Because script|href and script|xlink:href were missing from the SECURITY_SCHEMA map and the getUrlSanitizer routing, Angular emitted the weaker ɵɵsanitizeUrl instead of ɵɵsanitizeResourceUrl for SVGScriptElement href bindings - allowing javascript:/data: URIs and remote script references to pass through. The patch adds those attribute keys to the schema, introduces SRC_RESOURCE_TAGS/HREF_RESOURCE_TAGS sets, and routes script xlink:href through ɵɵsanitizeResourceUrl. The CPE list confirms the affected ecosystem is the @angular/angular Node.js packages, with the 21.1.0-next.0 through next.4 prereleases explicitly enumerated.
Know when Angular gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Primary rating from GitHub Advisory.
CVSS VectorGitHub Advisory
Lifecycle Timeline
6DescriptionGitHub Advisory
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.
Executive ViewAI
A cross-site scripting vulnerability in Angular's Template Compiler (CVE-2026-22610) could allow attackers to inject malicious JavaScript and compromise user sessions or steal data from applications that dynamically bind untrusted input to SVG element attributes. Organizations should upgrade to patched Angular versions to eliminate this injection vector and prevent potential account takeovers.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Affected Products (CPE)GitHub Advisory
Cross-site scripting via Angular's server-side rendering package (@angular/platform-server) allows arbitrary JavaScript
Cross-site scripting in Angular's server-side rendering engine (`@angular/platform-server`) allows arbitrary JavaScript
Server-Side Rendering in Angular's @angular/platform-server leaks server-side credentials to attacker-controlled origins
Stored XSS in the Angular Template Compiler (npm package @angular/compiler) allows an authenticated attacker who can per
An unauthenticated remote attacker can lock up an Angular server-side rendering process by submitting HTML that contains
Server-side request forgery in Angular's @angular/ssr package (all versions from 19.0.0-next.0 before 19.2.18, 20.0.0-ne
Command injection via untrusted Markdown rendering in the Angular Language Service VS Code extension (versions prior to
Arbitrary code execution in the Angular Language Service VS Code extension prior to 21.2.4 allows attackers to silently
Server-Side Request Forgery in Angular's @angular/platform-server (SSR) lets remote unauthenticated attackers hijack the
Heap exhaustion and CPU starvation in @angular/router under Angular Server-Side Rendering on Node.js allow unauthenticat
Denial of service in the npm package @angular/router when Server-Side Rendering (SSR) is enabled on Node.js allows an un
Denial of service in @angular/router lets unauthenticated remote attackers crash Node.js server-side rendering workers b
GHSA-jrmj-c5cx-3cw6
NVD
CVE.org
EPSS
VulDB
Exploit-DB