🇰🇷 한글 설명
pnpm 패키지 매니저의 버전 10.0.0부터 10.25까지의 취약점으로, 깃 호스팅된 의존성에서bitrary 코드를 실행할 수 있어 원격 코드 실행이 가능합니다.
💡 쉬운 설명
pnpm 패키지 매니저의 일부 버전에서 깃 호스팅된 의존성이 원격 코드 실행을 가능하게 하는 취약점이 있습니다. 이는 의존성 라이프사이클 스크립트가 기본적으로 비활성화된 상태에서도 실행될 수 있습니다. 이 취약점은 pnpm 버전 10.26.0에서 수정되었습니다.
🇺🇸 원문 (English)
pnpm is a package manager. Versions 10.0.0 through 10.25 allow git-hosted dependencies to execute arbitrary code during pnpm install, circumventing the v10 security feature "Dependency lifecycle scripts execution disabled by default". While pnpm v10 blocks postinstall scripts via the onlyBuiltDependencies mechanism, git dependencies can still execute prepare, prepublish, and prepack scripts during the fetch phase, enabling remote code execution without user consent or approval. This issue is fixed in version 10.26.0.
📍 영향받는 시스템
pnpm 버전 10.0.0 ~ 10.25
⚔️ 공격 벡터
깃 호스팅된 의존성을 통해 원격 코드 실행
🛡️ 대응 방법
pnpm 버전을 10.26.0 이상으로 업그레이드
🔧 검증 코드
로컬 시스템에서 Python이 설치되어 있는지 확인하고, 코드를 실행하여 pnpm 버전을 확인합니다. 결과는 JSON 형식으로 출력됩니다.
python -c "import subprocess; output = subprocess.check_output(['pnpm', '--version']).decode('utf-8'); if '10.26.0' > output.split('.')[0] + '.' + output.split('.')[1] + '.' + output.split('.')[2]: print('{"result": "취약", "reason": "pnpm 버전이 10.26.0 미만"}'); else: print('{"result": "양호", "reason": "pnpm 버전이 10.26.0 이상"}')"