🔍 CVE-2024-34347

8.3
CVSS Score
HIGH
2024-05-08
2026-06-17 07:33
✅ 완료

🇰🇷 한글 설명

@hoppscotch/js-sandbox 패키지는 JavaScript를 실행하기 위해 Node.js vm 모듈을 사용하는데, 외부 객체 참조를 통해 샌드박스를 탈출할 수 있는 취약점이 있습니다. 이를 악용하면 환경 변수와 민감한 데이터에 접근 가능하며, 0.8.0에서 수정되었습니다.

💡 쉬운 설명

@hoppscotch/cli의 코드 실행 환경이 악의적인 코드로부터 제대로 보호되지 않는 문제입니다. 공격자는 이를 이용해 시스템의 비밀 정보나 환경 설정을 빼낼 수 있습니다.

🇺🇸 원문 (English)

@hoppscotch/cli is a CLI to run Hoppscotch Test Scripts in CI environments. Prior to 0.8.0, the @hoppscotch/js-sandbox package provides a Javascript sandbox that uses the Node.js vm module. However, the vm module is not safe for sandboxing untrusted Javascript code. This is because code inside the vm context can break out if it can get a hold of any reference to an object created outside of the vm. In the case of @hoppscotch/js-sandbox, multiple references to external objects are passed into the vm context to allow pre-request scripts interactions with environment variables and more. But this also allows the pre-request script to escape the sandbox. This vulnerability is fixed in 0.8.0.

📍 영향받는 시스템

@hoppscotch/cli, @hoppscotch/js-sandbox 0.8.0 미만 버전

⚔️ 공격 벡터

악의적인 pre-request 스크립트에서 vm 모듈의 외부 객체 참조를 조작하여 샌드박스 탈출

🛡️ 대응 방법

@hoppscotch/cli와 @hoppscotch/js-sandbox를 0.8.0 이상으로 즉시 업데이트

🔧 검증 코드

설치된 버전이 0.8.0 미만(0.x.x 형식에서 x < 800)이면 VULNERABLE 출력, 아니면 안전함

Shell / Script
npm list @hoppscotch/js-sandbox | grep -oE '@hoppscotch/js-sandbox@[0-9.]+' | grep -oE '[0-9.]+' | awk -F. '{if($1*1000+$2*10+$3<800) print "VULNERABLE"}'

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H

💻 영향받는 소프트웨어

Node.js