🇰🇷 한글 설명
Shescape 라이브러리의 Windows 환경(cmd.exe)에서 getEscapeFunction 함수가 괄호 '(' 및 ')'를 적절히 이스케이프하지 못하는 취약점입니다. 공격자가 제어 가능한 인자를 통해 괄호로 묶인 CMD 구문을 탈출하고 임의의 쉘 명령어를 실행할 수 있습니다.
💡 쉬운 설명
프로그램이 명령어를 안전하게 감싸주지 못해, 공격자가 특수 기호를 사용하여 원래 실행하려던 명령 대신 악성 명령을 실행하게 만들 수 있는 문제입니다. 윈도우의 명령 프롬프트(CMD)를 사용하는 환경에서 발생합니다.
🇺🇸 원문 (English)
Shescape is a simple shell escape library for JavaScript. Prior to 2.1.14 and 3.0.1, getEscapeFunction in src/internal/win/cmd.js does not escape `(` and `)` when applications use the escape or escapeAll APIs on Windows with shell set to cmd.exe, or with shell set to true when CMD is the default. An attacker-controlled argument can break out of a parenthesized CMD construct and inject shell syntax depending on the original command, resulting in arbitrary command execution. This issue is fixed in versions 2.1.14 and 3.0.1.
📍 영향받는 시스템
Shescape 버전 2.1.14 미만 및 3.0.1 미만
⚔️ 공격 벡터
사용자 입력값이 포함된 인자를 통해 괄호 구문을 탈출하여 임의의 쉘 명령어를 주입하는 방식
🛡️ 대응 방법
Shescape 라이브러리를 2.1.14 또는 3.0.1 이상의 최신 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 2.1.14 또는 3.0.1보다 낮은지 확인하여 취약 여부를 판단합니다.
💻 영향받는 소프트웨어
Storage Protect Snapshot for Windows