{"id":"CVE-2026-22610","aliases":["CVE-2026-22610","GHSA-jrmj-c5cx-3cw6"],"related":[],"kind":"vulnerability","state":"published","title":"Angular has XSS Vulnerability via Unsanitized SVG Script Attributes","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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","format":"markdown","source":"ghsa"},{"lang":"es","text":"Angular es una plataforma de desarrollo para construir aplicaciones web móviles y de escritorio usando TypeScript/JavaScript y otros lenguajes. Antes de las versiones 19.2.18, 20.3.16, 21.0.7 y 21.1.0-rc.0, una vulnerabilidad de cross-site scripting (XSS) ha sido identificada en el Compilador de Plantillas de Angular. La vulnerabilidad existe porque el esquema de saneamiento interno de Angular no reconoce los atributos href y xlink:href de los elementos SVG","source":"nvd"}],"published":"2026-01-09T18:52:14.000Z","modified":"2026-09-10T03:50:33.469Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":8.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":8.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":">= 21.1.0-next.0, < 21.1.0-rc.0","status":"affected"},{"version":">= 21.0.0-next.0, < 21.0.7","status":"affected"},{"version":">= 20.0.0-next.0, < 20.3.16","status":"affected"},{"version":"< 19.2.18","status":"affected"}],"vendor":"angular","product":"angular","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"21.1.0-next.0","status":"affected","fixed":"21.1.0-rc.0"}],"ecosystem":"npm","package":"@angular/compiler","purl":"pkg:npm/%40angular/compiler","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"21.1.0-next.0","status":"affected","fixed":"21.1.0-rc.0"}],"ecosystem":"npm","package":"@angular/core","purl":"pkg:npm/%40angular/core","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"21.0.0-next.0","status":"affected","fixed":"21.0.7"}],"ecosystem":"npm","package":"@angular/compiler","purl":"pkg:npm/%40angular/compiler","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"21.0.0-next.0","status":"affected","fixed":"21.0.7"}],"ecosystem":"npm","package":"@angular/core","purl":"pkg:npm/%40angular/core","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"20.0.0-next.0","status":"affected","fixed":"20.3.16"}],"ecosystem":"npm","package":"@angular/compiler","purl":"pkg:npm/%40angular/compiler","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"20.0.0-next.0","status":"affected","fixed":"20.3.16"}],"ecosystem":"npm","package":"@angular/core","purl":"pkg:npm/%40angular/core","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"19.0.0-next.0","status":"affected","fixed":"19.2.18"}],"ecosystem":"npm","package":"@angular/compiler","purl":"pkg:npm/%40angular/compiler","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"19.0.0-next.0","status":"affected","fixed":"19.2.18"}],"ecosystem":"npm","package":"@angular/core","purl":"pkg:npm/%40angular/core","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"18.2.14"}],"ecosystem":"npm","package":"@angular/compiler","purl":"pkg:npm/%40angular/compiler","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"18.2.14"}],"ecosystem":"npm","package":"@angular/core","purl":"pkg:npm/%40angular/core","source":"ghsa"},{"ranges":[{"status":"affected","lastAffected":"18.2.14"},{"status":"affected","introduced":"19.0.0","fixed":"19.2.18"},{"status":"affected","introduced":"20.0.0","fixed":"20.3.16"},{"status":"affected","introduced":"21.0.0","fixed":"21.0.7"},{"status":"affected","version":"21.1.0"},{"status":"affected","version":"21.1.0"},{"status":"affected","version":"21.1.0"},{"status":"affected","version":"21.1.0"},{"status":"affected","version":"21.1.0"}],"vendor":"angular","product":"angular","cpe":"cpe:2.3:a:angular:angular:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/angular/angular/security/advisories/GHSA-jrmj-c5cx-3cw6","tags":["mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/angular/angular/pull/66318","tags":["issue-tracking","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/angular/angular/commit/91dc91bae4a1bbefc58bef6ef739d0e02ab44d56","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-485750.html","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-253495.html","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-22610","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/angular/angular","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-01-13T04:55:49.721Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-22610","url":"https://www.cve.org/CVERecord?id=CVE-2026-22610","licence":"CVE Terms of Use","modified":"2026-06-02T13:00:45.332Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-jrmj-c5cx-3cw6","url":"https://github.com/advisories/GHSA-jrmj-c5cx-3cw6","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:33.469Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-22610","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-22610","licence":"Public domain","modified":"2026-06-17T10:20:09.593Z"}],"updatedAt":"2026-11-25T22:59:12.712Z","epss":{"score":0.00439,"percentile":0.39916,"date":"2026-12-01T12:00:22.000Z"}}