🇰🇷 한글 설명
PHP 의존성 관리 도구인 Composer의 특정 버전에서 Perforce 소스 유형을 사용할 때 발생하는 명령 주입 취약점입니다. 악의적인 설정 파일이나 저장소를 통해 rsh 또는 jsh 프로토콜을 포함한 주소를 전달하면, Perforce 클라이언트가 검증 없이 이를 실행하여 사용자 권한으로 로컬 명령을 수행할 수 있습니다.
💡 쉬운 설명
해커가 만든 가짜 설정 파일을 사용하면 컴퓨터가 해커의 명령을 몰래 실행하게 만들 수 있는 보안 약점입니다. Composer를 통해 프로그램을 설치할 때 사용자의 권한을 도용당할 위험이 있습니다.
🇺🇸 원문 (English)
Composer is a dependency Manager for the PHP language. From 1.0 until 2.2.30 and 2.10.3, a malicious dependency package from a custom Composer repository or an untrusted composer.lock file could set source.type to perforce and source.url to an rsh: or jsh: P4PORT value. When the Perforce p4 client was installed and Composer installed the package from source through composer install or composer update, including --prefer-source, Composer\Util\Perforce passed the address to p4 without validation, causing p4 to run a local command with the privileges of the user or CI account. Packagist.org does not permit Perforce source metadata. This issue is fixed in versions 2.2.30 and 2.10.3.
📍 영향받는 시스템
Composer 1.0 ~ 2.2.30 미만 및 2.10.3 미만 버전
⚔️ 공격 벡터
악의적인 composer.lock 파일 또는 커스텀 저장소를 통한 Perforce 프로토콜 명령 주입
🛡️ 대응 방법
Composer를 최신 버전(2.2.30 또는 2.10.3 이상)으로 업데이트하십시오.
🔧 검증 코드
출력 결과에 버전 번호가 나타나면 취약한 버전이 설치되어 있는 것이며, 아무것도 출력되지 않으면 안전합니다.
composer --version | grep -E '2' | grep -vE '2.2.30|2.10.3'