CVE-2022-23651 b2-sdk-python TOCTOU application key disclosure
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: no · technical impact: partial
Description
b2-sdk-python is a python library to access cloud storage provided by backblaze. Linux and Mac releases of the SDK version 1.14.0 and below contain a key disclosure vulnerability that, in certain conditions, can be exploited by local attackers through a time-of-check-time-of-use (TOCTOU) race condition. SDK users of the SqliteAccountInfo format are vulnerable while users of the InMemoryAccountInfo format are safe. The SqliteAccountInfo saves API keys (and bucket name-to-id mapping) in a local database file ($XDG_CONFIG_HOME/b2/account_info, ~/.b2_account_info or a user-defined path). When first created, the file is world readable and is (typically a few milliseconds) later altered to be private to the user. If the directory containing the file is readable by a local attacker then during the brief period between file creation and permission modification, a local attacker can race to open the file and maintain a handle to it. This allows the local attacker to read the contents after the file after the sensitive information has been saved to it. Consumers of this SDK who rely on it to save data using SqliteAccountInfo class should upgrade to the latest version of the SDK. Those who believe a local user might have opened a handle using this race condition, should remove the affected database files and regenerate all application keys. Users should upgrade to b2-sdk-python 1.14.1 or later.
Upgrade path
3 packages: 2 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| Backblaze b2 python software development kit | <= 1.14.0 | after 1.14.0 | Fixed |
| pypi b2sdk(PyPI) | < 1.14.1; = 0.1.4; = 0.1.6; = 0.1.8 +19 more | 1.14.1 | Fixed |
| Backblaze b2-sdk-python | = < 1.14.1 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| pypi b2sdk(PyPI) | < 1.14.1 | 1.14.1 |
| pypi b2sdk(PyPI) | = 0.1.4 | No fix listed |
| pypi b2sdk(PyPI) | = 0.1.6 | No fix listed |
| pypi b2sdk(PyPI) | = 0.1.8 | No fix listed |
| pypi b2sdk(PyPI) | = 1.0.0 | No fix listed |
| pypi b2sdk(PyPI) | = 1.0.0rc1 | No fix listed |
| pypi b2sdk(PyPI) | = 1.0.2 | No fix listed |
| pypi b2sdk(PyPI) | = 1.1.0 | No fix listed |
| pypi b2sdk(PyPI) | = 1.1.2 | No fix listed |
| pypi b2sdk(PyPI) | = 1.1.4 | No fix listed |
| pypi b2sdk(PyPI) | = 1.10.0 | No fix listed |
| pypi b2sdk(PyPI) | = 1.11.0 | No fix listed |
| pypi b2sdk(PyPI) | = 1.12.0 | No fix listed |
| pypi b2sdk(PyPI) | = 1.13.0 | No fix listed |
| pypi b2sdk(PyPI) | = 1.14.0 | No fix listed |
| pypi b2sdk(PyPI) | = 1.2.0 | No fix listed |
| pypi b2sdk(PyPI) | = 1.3.0 | No fix listed |
| pypi b2sdk(PyPI) | = 1.4.0 | No fix listed |
| pypi b2sdk(PyPI) | = 1.5.0 | No fix listed |
| pypi b2sdk(PyPI) | = 1.6.0 | No fix listed |
| pypi b2sdk(PyPI) | = 1.7.0 | No fix listed |
| pypi b2sdk(PyPI) | = 1.8.0 | No fix listed |
| pypi b2sdk(PyPI) | = 1.9.0 | No fix listed |
| Backblaze b2-sdk-python | = < 1.14.1 | No fix listed |
| Backblaze b2 python software development kit | <= 1.14.0 | No fix listed |
References
- github.com third-party-advisory vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com patch third-party-advisory
- github.com product
- github.com
- pypi.org product
- github.com