🇰🇷 한글 설명
Rsbuild 2.0.9 미만 버전에서 macOS의 server.open 설정 시 명령 주입(Command Injection) 취약점이 발견되었습니다. 공격자가 셸 메타문자가 포함된 특수 URL을 제공하면, encodeURI()가 달러 기호나 세미콜론 등을 제대로 인코딩하지 못해 임의의 OS 명령어가 실행될 수 있습니다.
💡 쉬운 설명
웹 브라우저를 자동으로 열어주는 기능에 악성 코드가 숨겨진 주소를 넣으면, 컴퓨터가 이를 명령어로 착각해 실행해버리는 문제입니다. 이를 통해 해커가 사용자의 컴퓨터를 마음대로 조종할 수 있습니다.
🇺🇸 원문 (English)
Rsbuild before 2.0.9 contains a command injection vulnerability that allows attackers to execute arbitrary OS commands by supplying a crafted URL containing shell metacharacters to the server.open configuration on macOS. The openBrowser() function in packages/core/src/server/open.ts passes the URL through encodeURI() before interpolating it into a shell command executed via child_process.exec(), but because encodeURI() does not encode dollar signs, parentheses, or semicolons, embedded shell metacharacters are evaluated by /bin/sh, enabling arbitrary command execution.
📍 영향받는 시스템
Rsbuild versions prior to 2.0.9 (specifically on macOS)
⚔️ 공격 벡터
crafted URL containing shell metacharacters ($, (), ;) passed to server.open configuration
🛡️ 대응 방법
Update Rsbuild to version 2.0.9 or higher
🔧 검증 코드
출력된 rsbuild 버전이 2.0.9 미만인지 확인합니다.
npm list rsbuild | grep -E 'rsbuild@'