6.1medium
XSS in Dart SDK
- Severity
- 6.1medium CVSS:3.1 by NVD
- Exploit likelihood
- 0.68% (higher than 53% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Google LLC Dart SDK | from stable before 2.12.3 | CVE List |
| dart dart_software_development_kit | before 2.12.3 | NVD |
All scores
| NVD | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | 4.3medium CVSS:2.0 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
Classification
What each source says
CVE List
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.
NVD (es)
Una mala lógica de comprobación en el Dart SDK versiones anteriores a 2.12.3 permite a un atacante usar un ataque de tipo XSS por medio de DOM clobbering. La lógica de comprobación en dart: html para crear nodos DOM a partir de texto no se saneaban apropiadamente cuando se encontraba con etiquetas de plantilla
References
| https://github.com/dart-lang/sdk/security/advisories/GHSA-3rfv-4jvg-9522 | broken-link | |
| https://github.com/dart-lang/sdk/commit/ce5a1c2392debce967415d4c09359ff2555e3588 | patch, third-party-advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-22540 changed 2024-08-03 | CVE Terms of Use |
| NVD | CVE-2021-22540 changed 2026-06-17 | Public domain |