🇰🇷 한글 설명
virtualenv 21.14.9 미만 버전에서 PipInstall._uninstall_previous_version() 함수가 기존 시드 패키지 메타데이터를 검증 없이 처리하는 취약점이 발견되었습니다. 공격자가 조작된 메타데이터를 사용하면 환경 생성 과정에서 사용자의 권한을 이용해 환경 루트 외부의 파일을 삭제할 수 있습니다.
💡 쉬운 설명
파이썬 가상 환경을 만들 때, 악의적으로 조작된 정보를 이용해 컴퓨터의 엉뚱한 파일을 지워버릴 수 있는 문제입니다. 가상 환경을 만드는 과정에서 권한이 있는 파일들이 의도치 않게 삭제될 위험이 있습니다.
🇺🇸 원문 (English)
virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, PipInstall._uninstall_previous_version() accepts existing seed-package metadata and _uninstall_dist() joins entries from top_level.txt and RECORD to site-packages without checking containment. When a reused destination contains distribution metadata influenced by another account, relative traversal, absolute entries, or linked parents can cause app-data reseeding to delete files outside the environment or the environment root with the invoking user's permissions, provided that user has deletion rights over the named paths. The deletion occurs during environment creation before any later use of the environment. Fresh environments without existing package metadata and creation with --clear do not enter this cleanup path. This issue is fixed in version 21.14.9.
📍 영향받는 시스템
virtualenv 21.14.9 미만 모든 버전
⚔️ 공격 벡터
조작된 배포 메타데이터(top_level.txt 또는 RECORD)를 포함한 기존 패키지가 존재하는 환경에서 가상 환경 생성 시 발생
🛡️ 대응 방법
virtualenv를 최신 버전인 21.14.9 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 21.14.9보다 낮으면 취약한 상태입니다.
pip show virtualenv | grep Version