🔍 CVE-2022-23653

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

🇰🇷 한글 설명

B2 커맨드라인 도구 3.2.0 이하 버전의 Linux 및 Mac용 릴리스에서 TOCTOU 레이스 컨디션으로 인한 키 노출 취약점이 발견되었습니다. 파일이 생성된 후 권한이 변경되기 전의 짧은 순간을 이용해 로컬 공격자가 API 키와 같은 민감한 정보를 읽을 수 있습니다.

💡 쉬운 설명

프로그램이 중요한 비밀번호 파일을 만들고 나서 '나만 볼 수 있게' 잠그기 전까지 아주 짧은 찰나의 순간이 있습니다. 해커가 이 틈을 타서 파일을 미리 열어두면 비밀번호를 훔쳐갈 수 있는 문제입니다.

🇺🇸 원문 (English)

B2 Command Line Tool is the official command line tool for the backblaze cloud storage service. Linux and Mac releases of the B2 command-line tool version 3.2.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. The command line tool 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 `b2 authorize-account` is first run. This happens regardless of whether a valid key is provided or not. 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 is readable by a local attacker and the user did not yet run `b2 authorize-account` 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. Users that have not yet run `b2 authorize-account` should upgrade to B2 Command-Line Tool v3.2.1 before running it. Users that have run `b2 authorize-account` are safe if at the time of the file creation no other local users had read access to the local configuration file. Users that have run `b2 authorize-account` where the designated path could be opened by another local user should upgrade to B2 Command-Line Tool v3.2.1 and remove the database and regenerate all application keys. Note that `b2 clear-account` does not remove the database file and it should not be used to ensure that all open handles to the file are invalidated. If B2 Command-Line Tool cannot be upgraded to v3.2.1 due to a dependency conflict, a binary release can be used instead. Alternatively a new version could be installed within a virtualenv, or the permissions can be changed to prevent local users from opening the database file.

📍 영향받는 시스템

B2 Command Line Tool v3.2.0 및 그 이하 버전 (Linux, Mac)

⚔️ 공격 벡터

로컬 시스템에 접근 가능한 공격자가 파일 생성과 권한 변경 사이의 레이스 컨디션을 이용한 로컬 공격

🛡️ 대응 방법

B2 Command-Line Tool을 v3.2.1 이상으로 업그레이드하고, 필요 시 기존 데이터베이스 파일을 삭제한 후 키를 재발급하십시오.

🔧 검증 코드

명령어 결과에 3.2.0 이하의 버전 번호가 출력되면 취약한 버전이 설치된 상태입니다.

Shell / Script
b2 version 2>/dev/null | grep -E '3\.[0-2]\.'

📊 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