🇰🇷 한글 설명
mcollina mcp-ripgrep 0.4.0 버전 이하의 Advanced Search Tool 구성 요소에서 OS 명령 주입 취약점이 발견되었습니다. src/index.ts 파일의 fileType 인자를 조작하여 로컬 환경에서 임의의 명령을 실행할 수 있습니다. 현재 이 취약점의 실재 여부에 대해서는 논란이 있으나, 코드상에서 특정 인자에 대한 이스케이프 처리가 누락된 점이 확인되었습니다.
💡 쉬운 설명
검색 도구의 파일 형식을 지정하는 칸에 악성 명령어를 입력하면 컴퓨터가 이를 그대로 실행해버리는 문제입니다. 공격자가 내 컴퓨터에서 원하는 명령을 마음대로 내릴 수 있어 위험할 수 있습니다.
🇺🇸 원문 (English)
A security flaw has been discovered in mcollina mcp-ripgrep up to 0.4.0. Affected is an unknown function of the file src/index.ts of the component Advanced Search Tool. The manipulation of the argument fileType results in os command injection. The attack requires a local approach. The exploit has been released to the public and may be used for attacks. The real existence of this vulnerability is still doubted at the moment. The code's own escapeShellArg on sibling arguments (skipped only for fileType) indicates that this is a CWE-78 oversight, not a documented design. The project maintainer cites the documentation: "This MCP server executes shell commands using the ripgrep tool. While efforts have been made to safely escape arguments, use caution when providing input, as it runs commands on your machine."
📍 영향받는 시스템
mcollina mcp-ripgrep 0.4.0 이하 버전
⚔️ 공격 벡터
로컬 환경에서 fileType 인자에 악성 셸 명령어를 삽입하는 방식
🛡️ 대응 방법
해당 라이브러리를 최신 버전으로 업데이트하거나, 외부 입력을 제공할 때 입력값 검증 및 이스케이프 처리를 철저히 수행해야 합니다.
🔧 검증 코드
출력된 버전 번호가 0.4.0 이하인지 확인합니다.
npm list mcp-ripgrep 2>/dev/null | grep -E 'mcp-ripgrep@'