What’s Vulnerable › Vulnerabilities
CVE-2021-22568: Dart - Publishing to third-party package repositories may expose pub.dev credentials
- Severity: high (CVSS 8.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.9% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2021-12-09 · updated 2026-06-17
- Weakness: CWE-255
Description
When using the dart pub publish command to publish a package to a third-party package server, the request would be authenticated with an oauth2 access_token that is valid for publishing on pub.dev. Using these obtained credentials, an attacker can impersonate the user on pub.dev. We recommend upgrading past https://github.com/dart-lang/sdk/commit/d787e78d21e12ec1ef712d229940b1172aafcdf8 or beyond version 2.15.0
Affected products
- Google LLC Dart SDK: before 2.15.0 — fixed in 2.15.0
How to fix
Upgrade to a fixed version: Google LLC Dart SDK 2.15.0. Check the vendor advisory for mitigations.
References
- https://github.com/dart-lang/sdk/blob/main/CHANGELOG.md
- https://github.com/dart-lang/sdk/commit/d787e78d21e12ec1ef712d229940b1172aafcdf8
- https://github.com/dart-lang/sdk/security/advisories/GHSA-r32f-vhjp-qhj7
- https://github.com/dart-lang/sdk/blob/main/CHANGELOG.md
- https://github.com/dart-lang/sdk/commit/d787e78d21e12ec1ef712d229940b1172aafcdf8
- https://github.com/dart-lang/sdk/security/advisories/GHSA-r32f-vhjp-qhj7
Get alerted when CVE-2021-22568 or the next vulnerability affects your stack