# CVE-2021-22540: XSS in Dart SDK

- Priority: **Routine**
- Reason: Not severe (CVSS 6.1, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2021-04-22 · Modified: 2024-08-03
- Record: https://cvemate.com/vulnerability/CVE-2021-22540 · JSON: https://cvemate.com/vulnerability/CVE-2021-22540/json

## Description

```text
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.
```

## Signals

- CVSS: 6.1 medium (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- EPSS: 0.681%, percentile 53.855%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- dart dart\_software\_development\_kit: \< 2.12.3
- google llc dart sdk: ≥ stable, \< 2.12.3

## References

- <https://github.com/dart-lang/sdk/security/advisories/GHSA-3rfv-4jvg-9522>
- <https://github.com/dart-lang/sdk/commit/ce5a1c2392debce967415d4c09359ff2555e3588>

---

Data as of 2026-12-05T04:45:13.308Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
