CVE-2026-22610: @angular/core Cross-Site Scripting Vulnerability
HIGHCVE-2026-22610 is a HIGH cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting @angular/core libraries in the npm ecosystem. The issue involves angular has xss vulnerability via unsanitized svg script attributes. Remediation is available by upgrading affected packages to version 21.1.0-rc.0, 21.0.7, 20.3.16, 19.2.18.
CVE-2026-22610 at a Glance
How to Fix CVE-2026-22610
To remediate this vulnerability, upgrade all affected @angular/core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
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@21.0.7
npm install @angular/compiler@20.3.16
npm install @angular/core@20.3.16
npm install @angular/compiler@19.2.18
npm install @angular/core@19.2.18
npm install @angular/compiler@Latest secure release
npm install @angular/core@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @angular/core
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-22610, inspect your project dependencies using npm:
npm ls @angular/core
Analyze the terminal output to locate any version of @angular/core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 21.1.0-rc.0), your application is affected.
Note: The npm ls @angular/core command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In @angular/core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-22610 Affected @angular/core Versions
10 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@angular/core
|
npm |
≥ 21.1.0-next.0
< 21.1.0-rc.0
|
21.1.0-rc.0
|
|
@angular/compiler
|
npm |
≥ 21.1.0-next.0
< 21.1.0-rc.0
|
21.1.0-rc.0
|
|
@angular/compiler
|
npm |
≥ 21.0.0-next.0
< 21.0.7
|
21.0.7
|
|
@angular/core
|
npm |
≥ 21.0.0-next.0
< 21.0.7
|
21.0.7
|
|
@angular/compiler
|
npm |
≥ 20.0.0-next.0
< 20.3.16
|
20.3.16
|
|
@angular/core
|
npm |
≥ 20.0.0-next.0
< 20.3.16
|
20.3.16
|
|
@angular/compiler
|
npm |
≥ 19.0.0-next.0
< 19.2.18
|
19.2.18
|
|
@angular/core
|
npm |
≥ 19.0.0-next.0
< 19.2.18
|
19.2.18
|
|
@angular/compiler
|
npm |
≤ 18.2.14
|
|
|
@angular/core
|
npm |
≤ 18.2.14
|
|
References
Frequently Asked Questions
What is CVE-2026-22610?
Which @angular/core versions are affected?
What version fixes CVE-2026-22610?
Is @angular/core affected?
Is @angular/compiler affected?
What CWE is associated with CVE-2026-22610?
How can I check npm dependencies for CVE-2026-22610?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jrmj-c5cx-3cw6",
"modified" : "2026-06-09T10:56:09Z",
"published" : "2026-01-09T18:52:14Z",
"aliases" : [ "CVE-2026-22610" ],
"summary" : "Angular has XSS Vulnerability via Unsanitized SVG Script Attributes",
"details" : "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.\n\nIn 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.\n\nWhen 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.\n\n### Impact\nWhen successfully exploited, this vulnerability allows for **arbitrary JavaScript execution** within the context of the victim's browser session. This can lead to:\n- **Session Hijacking:** Stealing session cookies, localStorage data, or authentication tokens.\n- **Data Exfiltration:** Accessing and transmitting sensitive information displayed within the application.\n- **Unauthorized Actions:** Performing state-changing actions (like clicking buttons or submitting forms) on behalf of the authenticated user.\n\n### Attack Preconditions\n\n1. The victim application must explicitly use SVG `<script>` elements within its templates.\n2. The application must use property or attribute binding (interpolation) for the `href` or `xlink:href` attributes of those SVG scripts.\n3. 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).\n\n### Patches\n- 19.2.18\n- 20.3.16\n- 21.0.7\n- 21.1.0-rc.0\n\n### Workarounds\nUntil the patch is applied, developers should:\n\n- **Avoid Dynamic Bindings**: Do not use Angular template binding (e.g., `[attr.href]`) for SVG `<script>` elements.\n- **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.\n\n### Resources\n\n- https://github.com/angular/angular/pull/66318",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@angular/compiler"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "21.1.0-next.0"
}, {
"fixed" : "21.1.0-rc.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@angular/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "21.1.0-next.0"
}, {
"fixed" : "21.1.0-rc.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@angular/compiler"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "21.0.0-next.0"
}, {
"fixed" : "21.0.7"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@angular/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "21.0.0-next.0"
}, {
"fixed" : "21.0.7"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@angular/compiler"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "20.0.0-next.0"
}, {
"fixed" : "20.3.16"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@angular/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "20.0.0-next.0"
}, {
"fixed" : "20.3.16"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@angular/compiler"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "19.0.0-next.0"
}, {
"fixed" : "19.2.18"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@angular/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "19.0.0-next.0"
}, {
"fixed" : "19.2.18"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@angular/compiler"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "18.2.14"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@angular/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "18.2.14"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/angular/angular/security/advisories/GHSA-jrmj-c5cx-3cw6"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-22610"
}, {
"type" : "WEB",
"url" : "https://github.com/angular/angular/pull/66318"
}, {
"type" : "WEB",
"url" : "https://github.com/angular/angular/commit/91dc91bae4a1bbefc58bef6ef739d0e02ab44d56"
}, {
"type" : "WEB",
"url" : "https://cert-portal.siemens.com/productcert/html/ssa-253495.html"
}, {
"type" : "WEB",
"url" : "https://cert-portal.siemens.com/productcert/html/ssa-485750.html"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/angular/angular"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-01-09T18:52:14Z",
"nvd_published_at" : "2026-01-10T04:16:01Z"
}
}