🇰🇷 한글 설명
Happy DOM v19 이하에서 Node.js VM Context가 격리되지 않아 신뢰할 수 없는 JavaScript 코드 실행 시 원격 코드 실행(RCE) 공격이 가능합니다. JavaScript 평가가 기본적으로 활성화되어 있어 사용자가 의도하지 않게 위험에 노출될 수 있습니다. v20.0.0에서 JavaScript 평가가 기본적으로 비활성화됨으로써 패치되었습니다.
💡 쉬운 설명
Happy DOM 시뮬레이션 도구의 v19 버전 이하에서 신뢰할 수 없는 코드를 실행하면 컴퓨터 전체가 공격받을 수 있습니다. 위험한 기능이 기본으로 켜져 있어 사용자가 모르는 사이에 피해를 입을 수 있습니다.
🇺🇸 원문 (English)
Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. Happy DOM v19 and lower contains a security vulnerability that puts the owner system at the risk of RCE (Remote Code Execution) attacks. A Node.js VM Context is not an isolated environment, and if the user runs untrusted JavaScript code within the Happy DOM VM Context, it may escape the VM and get access to process level functionality. It seems like what the attacker can get control over depends on if the process is using ESM or CommonJS. With CommonJS the attacker can get hold of the `require()` function to import modules. Happy DOM has JavaScript evaluation enabled by default. This may not be obvious to the consumer of Happy DOM and can potentially put the user at risk if untrusted code is executed within the environment. Version 20.0.0 patches the issue by changing JavaScript evaluation to be disabled by default.
📍 영향받는 시스템
Happy DOM v19 및 이하 버전 (npm 패키지)
⚔️ 공격 벡터
Happy DOM VM Context 내에서 신뢰할 수 없는 JavaScript 코드 실행으로 require() 함수 접근 및 프로세스 레벨 기능 제어
🛡️ 대응 방법
Happy DOM을 v20.0.0 이상으로 즉시 업그레이드
🔧 검증 코드
출력된 버전이 v20.0.0 미만이면 취약하며, v20.0.0 이상이면 패치된 상태입니다.
npm list happy-dom 2>/dev/null | grep happy-dom | head -1