CVE-2021-22540: XSS in Dart SDK
Vulnerability summary
CVE-2021-22540 is a medium (CVSS 6.1) vulnerability in dart dart_software_development_kit. EPSS estimates a 0.68% chance of exploitation in the next 30 days, higher than 53.8% of scored vulnerabilities.
Not severe (CVSS 6.1, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Timeline
- 22-04-2021PublishedVulnerability first disclosed.
- 03-08-2024Last modifiedVulnerability information updated.
Description
Bad validation logic in the Dart SDK versions prior to 2.12.3 allow an attacker to use an XSS attack via DOM clobbering. The validation logic in dart:html for creating DOM nodes from text did not sanitize properly when it came across template tags.
CVSS metrics
2 scores · 1 source · 2 versionsEPSS trend
Probability
0.68%
Chance of exploitation in the next 30 days
Percentile
54%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.68% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
Dart1 product
- dart_software_development_kit< 2.12.3
Google llc1 product
- dart sdk≥ stable, < 2.12.3
2 vendors · 2 products
References
2 links- github.com/dart-lang/sdk/commit/ce5a1c2392debce967415d4c09359ff2555e3588X Refsource CONFIRMPatchThird Party Advisory