8.8high
Dart - Publishing to third-party package repositories may expose pub.dev credentials
- Severity
- 8.8high CVSS:3.1 by Google
- Exploit likelihood
- 0.94% (higher than 61% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
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
| Product or package | Versions | Reported by |
|---|---|---|
| Google LLC Dart SDK | from unspecified before 2.15.0 | CVE List |
| dart dart_software_development_kit | before 2.15.0 | NVD |
All scores
| 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:L | |
| NVD | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:L |
| NVD | 6.0medium CVSS:2.0 | AV:N/AC:M/Au:S/C:P/I:P/A:P |
Classification
What each source says
CVE List
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
NVD (es)
Cuando es usado el comando dart pub publish para publicar un paquete en un servidor de paquetes de terceros, la petición se autentifica con un access_token oauth2 válido para publicar en pub.dev. Usando estas credenciales obtenidas, un atacante puede suplantar al usuario en pub.dev. Se recomienda actualizar a partir de https://github.com/dart-lang/sdk/commit/d787e78d21e12ec1ef712d229940b1172aafcdf8 o de la versión 2.15
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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-22568 changed 2024-08-03 | CVE Terms of Use |
| NVD | CVE-2021-22568 changed 2026-06-17 | Public domain |