# CVE-2021-22568: Dart - Publishing to third-party package repositories may expose pub.dev credentials

- Severity: High 8.8 (CVSS:3.1, scored by Google) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.94%, higher than 61% of CVEs (2026-12-01)
- Published: 2021-12-09T17:05:12.000Z
- Modified: 2026-06-17T03:37:26.600Z
- Weaknesses: CWE-255, CWE-668
- Assigned by: Google

## 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

(As written by CVE List.)

## Affected

- Google LLC Dart SDK: from unspecified before 2.15.0
- dart dart_software_development_kit: before 2.15.0

## Every score

- Google: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:L`
- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:L`
- NVD: CVSS:2.0 6.0 Medium `AV:N/AC:M/Au:S/C:P/I:P/A:P`

## References

- <https://github.com/dart-lang/sdk/commit/d787e78d21e12ec1ef712d229940b1172aafcdf8> (patch, third-party-advisory)
- <https://github.com/dart-lang/sdk/blob/main/CHANGELOG.md> (patch, third-party-advisory)
- <https://github.com/dart-lang/sdk/security/advisories/GHSA-r32f-vhjp-qhj7> (issue-tracking)

## Sources

- CVE List: [CVE-2021-22568](https://www.cve.org/CVERecord?id=CVE-2021-22568), CVE Terms of Use, modified 2024-08-03
- NVD: [CVE-2021-22568](https://nvd.nist.gov/vuln/detail/CVE-2021-22568), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-22568 · Whole record: https://cve.day/CVE-2021-22568.json · Rebuilt by cve.day 2026-11-25T22:58:05.912Z
