🔍 CVE-2022-23651

4.7
CVSS Score
MEDIUM
2022-02-23
2026-06-17 04:30
✅ 완료

🇰🇷 한글 설명

b2-sdk-python의 Linux 및 Mac 버전 1.14.0 이하에서 SqliteAccountInfo 형식을 사용할 때 API 키가 노출될 수 있는 취약점이 발견되었습니다. 파일 생성 직후 권한이 변경되기 전의 짧은 시간 차를 이용한 TOCTOU 레이스 컨디션 공격을 통해 로컬 공격자가 민감한 정보를 읽을 수 있습니다.

💡 쉬운 설명

프로그램이 중요한 비밀번호 파일을 만들고 나서 보안 설정을 하기 전까지 아주 짧은 찰나의 순간이 있습니다. 해커가 이 틈을 타서 파일을 미리 열어둠으로써 비밀번호를 훔쳐갈 수 있는 문제입니다.

🇺🇸 원문 (English)

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.

📍 영향받는 시스템

b2-sdk-python version 1.14.0 and below (Linux and Mac)

⚔️ 공격 벡터

로컬 공격자가 파일 생성과 권한 변경 사이의 시간차(TOCTOU)를 이용한 레이스 컨디션 공격

🛡️ 대응 방법

b2-sdk-python을 1.14.1 이상 버전으로 업그레이드하고, 노출이 의심될 경우 기존 데이터베이스 파일을 삭제한 후 API 키를 재발급하십시오.

🔧 검증 코드

출력된 Version이 1.14.1보다 낮으면 취약한 버전입니다.

Shell / Script
pip show b2-sdk-python 2>/dev/null | grep -E 'Version'

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N

💻 영향받는 소프트웨어

NVIDIA vGPU Guest Driver for Linux