🔍 CVE-2025-64726

0.0
CVSS Score
UNKNOWN
2025-11-13
2026-10-18 20:10
✅ 완료

🇰🇷 한글 설명

Socket Firewall 0.15.5 이전 버전은 프로젝트 디렉토리의 악의적인 .sfw.config 파일을 통해 NODE_OPTIONS 환경변수를 조작당하고, 이를 통해 보안 제어 초기화 전에 임의의 JavaScript 코드가 실행될 수 있습니다. 개발자가 신뢰할 수 없는 프로젝트에서 Socket Firewall 명령어를 실행할 때 공격이 성공합니다.

💡 쉬운 설명

공격자가 프로젝트 폴더에 악의적인 설정파일을 숨겨두면, 개발자가 Socket Firewall을 실행할 때 악성 코드가 자동으로 실행됩니다. 보안 검사가 시작되기 전에 코드가 먼저 작동하므로 탐지를 회피할 수 있습니다.

🇺🇸 원문 (English)

Socket Firewall is an HTTP/HTTPS proxy server that intercepts package manager requests and enforces security policies by blocking dangerous packages. Socket Firewall binary versions (separate from installers) prior to 0.15.5 are vulnerable to arbitrary code execution when run in untrusted project directories. The vulnerability allows an attacker to execute arbitrary code by placing a malicious `.sfw.config` file in a project directory. When a developer runs Socket Firewall commands (e.g., `sfw npm install`) in that directory, the tool loads the `.sfw.config` file and populates environment variables directly into the Node.js process. An attacker can exploit this by setting `NODE_OPTIONS` with a `--require` directive to execute malicious JavaScript code before Socket Firewall's security controls are initialized, effectively bypassing the tool's malicious package detection. The attack vector is indirect and requires a developer to install dependencies for an untrusted project and execute a command within the context of the untrusted project. The vulnerability has been patched in Socket Firewall version 0.15.5. Users should upgrade to version 0.15.5 or later. The fix isolates configuration file values from subprocess environments. Look at `sfw --version` for version information. If users rely on the recommended installation mechanism (e.g. global installation via `npm install -g sfw`) then no workaround is necessary. This wrapper package automatically ensures that users are running the latest version of Socket Firewall. Users who have manually installed the binary and cannot immediately upgrade should avoid running Socket Firewall in untrusted project directories. Before running Socket Firewall in any new project, inspect `.sfw.config` and `.env.local` files for suspicious `NODE_OPTIONS` or other environment variable definitions that reference local files.

📍 영향받는 시스템

Socket Firewall 바이너리 버전 0.15.5 미만 (직접 설치된 바이너리만, npm -g 래퍼는 제외)

⚔️ 공격 벡터

프로젝트 디렉토리에 .sfw.config 파일을 배치하고 NODE_OPTIONS에 --require 악성코드 경로를 설정하여 개발자가 명령어 실행 시 코드 실행 유도

🛡️ 대응 방법

Socket Firewall을 0.15.5 이상으로 업그레이드하거나 npm -g 설치 방식 사용, 신뢰할 수 없는 프로젝트 디렉토리에서는 실행 금지

🔧 검증 코드

출력된 버전이 0.15.5 이상이면 안전, 그 이하이면 즉시 업그레이드 필요

Shell / Script
sfw --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+'

💻 영향받는 소프트웨어

Node.js