🇰🇷 한글 설명
Node.js용 git 인터페이스인 simple-git의 3.15.0부터 4.0.1 버전 사이에서 발생하며, 특정 설정값이 안전하지 않은 작업으로 분류되지 않는 취약점입니다. 공격자가 제어 가능한 값을 통해 git interpret-trailers 명령이 실행될 때 임의의 쉘 명령어를 실행할 수 있습니다.
💡 쉬운 설명
프로그램이 Git 명령을 실행할 때 사용자가 입력한 악성 코드를 걸러내지 못하는 문제입니다. 이를 통해 해커가 컴퓨터에서 몰래 명령어를 실행하여 시스템을 장악할 수 있습니다.
🇺🇸 원문 (English)
simple-git, an interface for running git commands in any node.js application, enables applications to execute Git operations from JavaScript. From 3.15.0 until 4.0.1, the default blockUnsafeOperationsPlugin does not classify trailer.<token>.cmd as unsafe configuration. An application that passes attacker-controlled values through SimpleGitOptions.config or inline -c arguments can therefore allow Git to invoke an attacker-selected shell command when git interpret-trailers processes the configured trailer. The command executes with the operating-system identity and permissions of the Node.js process. This issue is fixed in 4.0.1.
📍 영향받는 시스템
simple-git 3.15.0 ~ 4.0.1
⚔️ 공격 벡터
SimpleGitOptions.config 또는 인라인 -c 인자에 공격자가 제어하는 값을 전달하여 shell command 실행
🛡️ 대응 방법
simple-git 버전을 4.0.1 이상으로 업데이트
🔧 검증 코드
출력된 결과에서 simple-git의 버전을 확인하여 4.0.1 미만인지 체크