Information Exposure Affecting b2sdk package, versions [,1.14.1)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.22% (13th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Information Exposure vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-B2SDK-2412976
  • published24 Feb 2022
  • disclosed24 Feb 2022
  • creditJan Schejbal

Introduced: 24 Feb 2022

CVE-2022-23651  (opens in a new tab)
CWE-367  (opens in a new tab)

How to fix?

Upgrade b2sdk to version 1.14.1 or higher.

Overview

b2sdk is a Backblaze B2 SDK

Affected versions of this package are vulnerable to Information Exposure. 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 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.

Note:

  1. SDK users of the SqliteAccountInfo format are vulnerable while users of the InMemoryAccountInfo format are safe.

CVSS Base Scores

version 3.1