🇰🇷 한글 설명
Python 패키지 및 의존성 관리자인 pdm의 2.27.0 미만 버전에서 경로 탐색(Path Traversal) 취약점이 발견되었습니다. write_to_fs() 함수가 경로 유효성을 검증하지 않고 os.path.join()을 사용하여 악성 wheel 파일이 임의의 파일을 시스템에 쓸 수 있습니다. 이 문제는 2.27.0 버전에서 수정되었습니다.
💡 쉬운 설명
pdm이라는 프로그램을 사용할 때, 나쁜 의도를 가진 파일이 컴퓨터의 엉뚱한 위치에 파일을 마음대로 저장할 수 있는 보안 구멍이 발견되었습니다. 이로 인해 중요한 시스템 파일이 변조될 위험이 있습니다.
🇺🇸 원문 (English)
pdm is a Python package and dependency manager supporting the latest PEP standards. Versions prior to 2.27.0 are vulnerable to path traversal through write_to_fs. InstallDestination.write_to_fs() in src/pdm/installers/installers.py overrides the base class to add symlink/hardlink support but replaces the safe _path_with_destdir() (which validates via Path.resolve() + is_relative_to()) with a bare os.path.join() that performs no path validation. A malicious wheel with traversal entries can write arbitrary files. This issue has been fixed in version 2.27.0.
📍 영향받는 시스템
pdm 2.27.0 미만 모든 버전
⚔️ 공격 벡터
경로 탐색 코드가 포함된 악성 wheel 파일을 설치하여 임의의 파일 쓰기 수행
🛡️ 대응 방법
pdm를 최신 버전인 2.27.0 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 2.27.0 미만인 경우 취약한 상태이며, 2.27.0 이상이면 안전합니다.
pdm --version 2>/dev/null | grep -E 'pdm-2\[0-9]\.[0-9]' || echo 'Version not found'