🇰🇷 한글 설명
execute_ruby 도구는 읽기 전용 샌드박스로 설계되었으나, pseudo-terminal 라이브러리의 spawn 진입점이 차단 목록에 포함되지 않아 보안 우회가 가능합니다. 이를 통해 공격자는 가드된 메서드를 우회하여 서버 계정 권한으로 셸을 실행하고 명령을 수행할 수 있습니다.
💡 쉬운 설명
안전하게 실행되어야 할 프로그램이 보안 규칙을 피해 컴퓨터의 명령창(셸)을 마음대로 열 수 있는 취약점입니다. 공격자가 이 구멍을 이용하면 서버의 제어권을 탈취할 수 있습니다.
🇺🇸 원문 (English)
The execute_ruby tool is documented as a read-only Ruby sandbox and is enforced by a pattern denylist together with replacements for the process-spawning methods on Kernel. The pseudo-terminal library's spawn entry points are neither in the denylist nor replaced, so a normal tool call could reach them and start a shell, executing commands as the account running the server and outside the guarded methods. The denylist was introduced with the tool in 1.4.0 and never covered those entry points through 1.6.0. Version 1.6.1 restricts the requires the sandbox permits to a data-only list and blocks dynamic dispatch to execution entry points; 2.0.0 removes the tool.
📍 영향받는 시스템
execute_ruby tool versions 1.4.0 to 1.6.0
⚔️ 공격 벡터
pseudo-terminal 라이브러리의 spawn 메서드를 호출하여 샌드박스 제한을 우회하고 셸 실행
🛡️ 대응 방법
버전을 1.6.1로 업데이트하거나, 해당 도구가 제거된 2.0.0 이상 버전으로 업그레이드하십시오.
🔧 검증 코드
출력 결과에 1.4.0에서 1.6.0 사이의 버전이 포함되어 있다면 취약한 상태입니다.
gem list execute_ruby | grep -E '1\.(4|5|6)\.'