🔍 CVE-2026-15921

3.1
CVSS Score
LOW
2026-07-15
2026-10-24 21:10
✅ 완료

🇰🇷 한글 설명

Node Version Manager(nvm) 0.32.1부터 0.40.5 버전에서 원격 LTS 별칭을 처리할 때 경로 탐색(Path Traversal) 취약점이 존재합니다. 공격자가 조작된 미러 서버를 통해 악성 경로가 포함된 LTS 코드네임을 전달하면, nvm이 사용자의 홈 디렉토리에 있는 .bashrc와 같은 설정 파일을 덮어써서 임의의 코드를 실행할 수 있습니다.

💡 쉬운 설명

nvm이 업데이트 정보를 가져올 때 파일 이름을 제대로 검사하지 않아 발생하는 문제입니다. 나쁜 의도를 가진 서버를 이용하면 사용자의 컴퓨터 설정 파일을 몰래 바꿔치기하여 해킹할 수 있습니다.

🇺🇸 원문 (English)

Node Version Manager (nvm) is a POSIX-compliant shell function for managing multiple node.js versions. In versions 0.32.1 through 0.40.5, `nvm ls-remote` (and other commands that refresh remote LTS aliases, such as `nvm install --lts`) parse the node.js mirror's `index.tab` and use each release's LTS codename field as an alias filename without validating it. A malicious, compromised, or man-in-the-middled mirror can return an LTS codename containing path-traversal sequences such as `../../../.bashrc`, causing nvm to write the associated version string to a path outside `$NVM_DIR/alias`. With the default layout (`$NVM_DIR` is `~/.nvm`), this can create or overwrite files in the user's home directory, including shell startup files, which can lead to code execution in a later shell session. Exploitation requires the victim to use a hostile mirror -- via a compromised mirror or CDN, a network man-in-the-middle, or a maliciously configured `NVM_NODEJS_ORG_MIRROR`/`NVM_IOJS_ORG_MIRROR` -- and to run an affected command. Version 0.40.6 validates remote LTS codenames as safe alias filenames and rejects `..` path components when writing alias files.

📍 영향받는 시스템

Node Version Manager (nvm) versions 0.32.1 through 0.40.5

⚔️ 공격 벡터

조작된 미러 서버 또는 중간자 공격(MITM)을 통해 악성 경로가 포함된 LTS 코드네임 전달

🛡️ 대응 방법

nvm을 버전 0.40.6 이상으로 업데이트하여 경로 검증 기능 적용

🔧 검증 코드

명령어 결과로 0.32.1에서 0.40.5 사이의 버전 번호가 출력되면 취약한 상태입니다.

Shell / Script
nvm --version | grep -E '^0/(3[2-9]|40/[0-5])\.'

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Node.js