🇰🇷 한글 설명
rubygem-hammer_cli 및 Satellite와 함께 배포되는 Railties 구성 요소에서 명령 주입 취약점이 발견되었습니다. $EDITOR 환경 변수가 Ruby의 system() 메서드에 안전하지 않게 보간되어, 셸 메타문자가 포함된 문자열을 통해 시스템 셸이 실행될 수 있습니다.
💡 쉬운 설명
사용자가 설정한 편집기 이름에 특수 문자를 섞어 넣으면, 컴퓨터가 이를 명령어로 오해하여 해커가 원하는 악성 코드를 실행할 수 있는 문제입니다. 환경 변수를 통해 시스템 권한을 탈취당할 위험이 있습니다.
🇺🇸 원문 (English)
A flaw was found in rubygem-hammer_cli. A command injection vulnerability exists in Hammer CLI and the Railties (Ruby on Rails) component distributed with Satellite due to the insecure interpolation of the $EDITOR environment variable into the Ruby system() method. By passing a single interpolated string to system(), the application invokes a system shell (/bin/sh) that interprets shell metacharacters (e.g., ;, |, &).
📍 영향받는 시스템
rubygem-hammer_cli, Satellite (Railties 포함)
⚔️ 공격 벡터
$EDITOR 환경 변수에 셸 메타문자(;, |, & 등)가 포함된 문자열을 주입하여 시스템 명령 실행
🛡️ 대응 방법
해당 라이브러리를 최신 보안 패치가 적용된 버전으로 업데이트하고, 환경 변수 입력값에 대한 검증을 강화하십시오.
🔧 검증 코드
설치된 hammer_cli의 버전을 확인하여 취약점이 해결된 버전인지 대조하십시오.