🔍 CVE-2026-22701

5.3
CVSS Score
MEDIUM
2026-01-10
2026-01-10 06:15
✅ 완료

🇰🇷 한글 설명

filelock 패키지의 SoftFileLock 구현에서 TOCTOU(시간-오브-체크-투-시간-오브-유즈) 경쟁 조건 취약점이 존재하여, 로컬 파일 시스템 접근 및 심볼릭 링크 생성 권한이 있는 공격자가 잠금 동작이 실패하거나 예상치 못한 행동을 일으킬 수 있다.

💡 쉬운 설명

filelock 패키지의 버그로 인해 공격자가 파일 잠금을 해제하거나 예상치 못한 행동을 일으킬 수 있습니다. 이는 로컬 파일 시스템 접근과 심볼릭 링크 생성 권한이 필요한 공격입니다. filelock 패키지 버전 3.20.3 이전의 버전에서 발생합니다.

🇺🇸 원문 (English)

filelock is a platform-independent file lock for Python. Prior to version 3.20.3, a TOCTOU race condition vulnerability exists in the SoftFileLock implementation of the filelock package. An attacker with local filesystem access and permission to create symlinks can exploit a race condition between the permission validation and file creation to cause lock operations to fail or behave unexpectedly. The vulnerability occurs in the _acquire() method between raise_on_not_writable_file() (permission check) and os.open() (file creation). During this race window, an attacker can create a symlink at the lock file path, potentially causing the lock to operate on an unintended target file or leading to denial of service. This issue has been patched in version 3.20.3.

📍 영향받는 시스템

filelock 패키지 버전 3.20.3 이전

⚔️ 공격 벡터

로컬 파일 시스템 접근 및 심볼릭 링크 생성

🛡️ 대응 방법

filelock 패키지 버전을 3.20.3 이상으로 업데이트합니다.

🔧 검증 코드

로컬 시스템에서 Python을 실행하여 filelock 패키지 버전을 확인합니다. Python이 설치되어 있고, filelock 패키지를 설치한 후에 실행합니다.

Shell / Script
import pkg_resources
try:
    version = pkg_resources.get_distribution('filelock').version
    if version < '3.20.3':
        print({"result": "취약", "reason": "filelock 버전이 3.20.3 미만"})
    else:
        print({"result": "양호", "reason": "filelock 버전이 3.20.3 이상"})
except pkg_resources.DistributionNotFound:
    print({"result": "미설치", "reason": "filelock 패키지가 설치되어 있지 않음"})

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Python