🇰🇷 한글 설명
virtualenv 21.14.9 이전 버전에서 발생하는 취약점으로, ensure_dir() 함수가 기존 심볼릭 링크를 제대로 검증하지 못해 발생합니다. 공격자가 미리 준비한 디렉토리 구조를 이용하면 가상 환경 생성 시 의도하지 않은 상위 디렉토리에 파일을 작성할 수 있습니다.
💡 쉬운 설명
가상 환경을 만드는 도구가 가짜 폴더 연결(심볼릭 링크)을 제대로 구별하지 못하는 문제입니다. 이를 통해 공격자는 사용자가 모르는 사이에 컴퓨터의 다른 중요한 폴더에 파일을 써넣을 수 있습니다.
🇺🇸 원문 (English)
virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, the builtin creator calls ensure_dir() for executable, library, and package directories, and ensure_dir() accepts an existing symlink to a directory because exists() follows it. Interpreter creation, seed installation, and activation generation then write through the linked parent outside the requested destination when another local account prepared the tree and the invoking user can access the target. The --clear option removes the planted tree first, while ordinary creation reaches it; arbitrary attacker-selected output bytes are not established. This issue is fixed in version 21.14.9.
📍 영향받는 시스템
virtualenv versions prior to 21.14.9
⚔️ 공격 벡터
로컬 계정을 통한 심볼릭 링크를 이용한 디렉토리 트로이 목마 공격
🛡️ 대응 방법
virtualenv를 21.14.9 버전 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 21.14.9보다 낮으면 취약한 상태입니다.
pip show virtualenv | grep Version