🇰🇷 한글 설명
pyenv 1.2.24부터 2.3.2 버전에서 로컬 사용자가 .python-version 파일을 통해 권한을 상승시킬 수 있는 취약점이 발견되었습니다. 공격자가 조작된 Python 버전 문자열을 포함한 .python-version 파일을 생성하면, 경로 탐색(Path Traversal)을 통해 임의의 shim 실행 파일을 실행할 수 있습니다.
💡 쉬운 설명
특정 폴더에 있는 설정 파일을 조작하여 컴퓨터의 권한을 몰래 높이는 공격입니다. 공격자가 만든 가짜 설정 파일이 실행되면서 시스템 명령어를 마음대로 실행할 수 있게 됩니다.
🇺🇸 원문 (English)
pyenv 1.2.24 through 2.3.2 allows local users to gain privileges via a .python-version file in the current working directory. An attacker can craft a Python version string in .python-version to execute shims under their control. (Shims are executables that pass a command along to a specific version of pyenv. The version string is used to construct the path to the command, and there is no validation of whether the version specified is a valid version. Thus, relative path traversal can occur.)
📍 영향받는 시스템
pyenv 1.2.24 ~ 2.3.2
⚔️ 공격 벡터
로컬 사용자가 조작된 .python-version 파일을 생성하여 경로 탐색 공격 수행
🛡️ 대응 방법
pyenv를 최신 버전으로 업데이트하여 경로 검증 로직 적용
🔧 검증 코드
출력된 버전이 2.3.2보다 높은지 확인하여 취약 여부를 판단합니다.