🇰🇷 한글 설명
NestJS 프레임워크의 @nestjs/devtools-integration 0.2.0 이하 버전에서 원격 코드 실행(RCE) 취약점이 발견되었습니다. 개발 도구 활성화 시 노출되는 특정 API 엔드포인트가 안전하지 않은 JavaScript 샌드박스를 사용하여, 악성 웹사이트 방문만으로도 로컬 환경에서 임의의 코드가 실행될 수 있습니다.
💡 쉬운 설명
개발용 도구가 켜져 있을 때, 나쁜 사이트에 접속하기만 해도 내 컴퓨터에 해커의 명령어가 실행될 수 있는 위험한 보안 구멍이 있습니다. 이 도구가 코드를 검사하는 과정에서 보안 벽이 허술하여 발생하는 문제입니다.
🇺🇸 원문 (English)
Nest is a framework for building scalable Node.js server-side applications. In versions 0.2.0 and below, a critical Remote Code Execution (RCE) vulnerability was discovered in the @nestjs/devtools-integration package. When enabled, the package exposes a local development HTTP server with an API endpoint that uses an unsafe JavaScript sandbox (safe-eval-like implementation). Due to improper sandboxing and missing cross-origin protections, any malicious website visited by a developer can execute arbitrary code on their local machine. The package adds HTTP endpoints to a locally running NestJS development server. One of these endpoints, /inspector/graph/interact, accepts JSON input containing a code field and executes the provided code in a Node.js vm.runInNewContext sandbox. This is fixed in version 0.2.1.
📍 영향받는 시스템
@nestjs/devtools-integration version 0.2.0 and below
⚔️ 공격 벡터
개발자가 악성 웹사이트를 방문할 때 브라우저를 통해 로컬 개발 서버의 취약한 API 엔드포인트로 요청을 보내는 방식
🛡️ 대응 방법
@nestjs/devtools-integration 패키지를 0.2.1 버전 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 번호가 0.2.1 미만(예: 0.2.0)이면 취약한 상태입니다.
npm list @nestjs/devtools-integration 2>/dev/null | grep '@nestjs/devtools-integration@'