🇰🇷 한글 설명
SandboxJS는 JavaScript 샌드박싱 라이브러리로, 0.8.36 이전 버전에서 restOfExp 함수 및 lispify/lispifyExpr 호출 체인에 무한 재귀 취약점이 존재합니다. 공격자가 깊게 중첩된 표현식(예: ~2000개의 중첩 괄호)을 입력하면 'RangeError: Maximum call stack size exceeded' 오류가 발생하여 Node.js 프로세스가 강제 종료됩니다. 버전 0.8.36에서 해당 취약점이 수정되었습니다.
💡 쉬운 설명
악의적인 사용자가 특수하게 조작된 JavaScript 코드를 입력하면 서버가 강제로 꺼질 수 있는 취약점입니다. 마치 전화기에 무한 반복 녹음 메시지를 보내 통화 시스템을 다운시키는 것과 같습니다.
🇺🇸 원문 (English)
SandboxJS is a JavaScript sandboxing library. Prior to 0.8.36, the @nyariv/sandboxjs parser contains unbounded recursion in the restOfExp function and the lispify/lispifyExpr call chain. An attacker can crash any Node.js process that parses untrusted input by supplying deeply nested expressions (e.g., ~2000 nested parentheses), causing a RangeError: Maximum call stack size exceeded that terminates the process. This vulnerability is fixed in 0.8.36.
📍 영향받는 시스템
@nyariv/sandboxjs 0.8.36 미만 버전을 사용하는 Node.js 애플리케이션
⚔️ 공격 벡터
신뢰할 수 없는 입력으로 약 2000개 이상의 중첩 괄호를 포함한 표현식을 파싱하도록 유도하여 스택 오버플로우 유발
🛡️ 대응 방법
@nyariv/sandboxjs를 0.8.36 이상으로 업그레이드: npm install @nyariv/sandboxjs@latest
🔧 검증 코드
출력된 버전이 0.8.36 이상이면 패치 적용 완료, 그 미만이거나 출력이 없으면 미설치 또는 취약 버전
npm list @nyariv/sandboxjs 2>/dev/null | grep -E 'sandboxjs@[0-9]+\.[0-9]+\.[0-9]+'