2.1 LOW
- CVSS version (CVSS): 4.0
- Attack Vector (AV): Network (N)
- Attack Complexity (AC): Low (L)
- Attack Requirement (AT): Present (P)
- Privileges Required (PR): None (N)
- User Interaction (UI): Active (A)
- Vulnerable System Impact Confidentiality (VC): None (N)
- Vulnerable System Impact Integrity (VI): Low (L)
- Vulnerable System Impact Availability (VA): None (N)
- Subsequent System Impact Confidentiality (SC): None (N)
- Subsequent System Impact Integrity (SI): None (N)
- Subsequent System Impact Availability (SA): None (N)
- Modified Attack Vector (MAV): Network (N)
- Modified Attack Complexity (MAC): Low (L)
- Modified Attack Requirement (MAT): Present (P)
- Modified Privileges Required (MPR): None (N)
- Modified User Interaction (MUI): Active (A)
- Modified Vulnerable System Impact Confidentiality (MVC): None (N)
- Modified Vulnerable System Impact Integrity (MVI): Low (L)
- Modified Vulnerable System Impact Availability (MVA): None (N)
- Modified Subsequent System Impact Confidentiality (MSC): Negligible (N)
- Modified Subsequent System Impact Integrity (MSI): Negligible (N)
- Modified Subsequent System Impact Availability (MSA): Negligible (N)
- Safety (S): Not Defined (X)
- Automatable (AU): Not Defined (X)
- Recovery (R): Not Defined (X)
- Value Density (V): Not Defined (X)
- Vulnerability Response Effort (RE): Not Defined (X)
- Provider Urgency (U): Not Defined (X)
- Confidentiality Req. (CR): Not Defined (X)
- Integrity Req. (IR): Not Defined (X)
- Availability Req. (AR): Not Defined (X)
- Exploit Maturity (E): Not Defined (X)
Activity log
- Created suggestion
nvm path traversal via a malicious mirror's LTS codename writes outside the alias directory
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.
References
-
GHSA-4ghp-wxpw-rhpg vendor-advisory
-
Fix commit 9275c5ba patch
Affected products
- <0.40.6
Matching in nixpkgs
pkgs.convmv
Converts filenames from one encoding to another
pkgs.krunvm
CLI-based utility for creating microVMs from OCI images
pkgs.libnvme
C Library for NVM Express on Linux
pkgs.nvme-rs
Lightweight tool for monitoring NVMe drive health with email alerts
pkgs.openvmm
Modular, cross-platform Virtual Machine Monitor (VMM), written in Rust
-
nixos-unstable 0-unstable-2025-03-13
- nixpkgs-unstable 0-unstable-2025-03-13
- nixos-unstable-small 0-unstable-2025-03-13
-
nixos-26.05 0-unstable-2025-03-13
- nixos-26.05-small 0-unstable-2025-03-13
- nixpkgs-26.05-darwin 0-unstable-2025-03-13
pkgs.nvme-cli
NVM-Express user space tooling for Linux
pkgs.nvmetcfg
NVMe-oF Target Configuration Utility for Linux
pkgs.nvmet-cli
NVMe target CLI
pkgs.crc64fast-nvme
SIMD accelerated carryless-multiplication CRC-64/NVME checksum computation (based on Intel's PCLMULQDQ paper)
pkgs.fishPlugins.nvm
Node.js version manager you'll adore, crafted just for Fish
pkgs.python313Packages.pynvml
Unofficial Python bindings for the NVIDIA Management Library
pkgs.python314Packages.pynvml
Unofficial Python bindings for the NVIDIA Management Library
pkgs.python313Packages.py3nvml
Python 3 Bindings for the NVIDIA Management Library
pkgs.python314Packages.py3nvml
Python 3 Bindings for the NVIDIA Management Library
Package maintainers
-
@al3xtjames Alex James <nix@alextjam.es>
-
@powwu powwu <hello@powwu.sh>
-
@samuela Samuel Ainsworth <skainsworth@gmail.com>
-
@YorikSar Yuriy Taraday <yorik.sar@gmail.com>
-
@GaetanLepage Gaetan Lepage <gaetan@glepage.com>
-
@prusnak Pavol Rusnak <pavol@rusnak.io>
-
@ConnorBaker Connor Baker <ConnorBaker01@gmail.com>
-
@SomeoneSerge Else Someone <else+nixpkgs@someonex.net>
-
@pta2002 Pedro Alves <pta2002@pta2002.com>
-
@NickCao Nick Cao <nickcao@nichi.co>
-
@vifino Adrian Pistol <vifino@tty.sh>
-
@Mic92 Jörg Thalheim <joerg@thalheim.io>
-
@liberodark liberodark <liberodark@gmail.com>
-
@Hoverbear Ana Hobden <operator+nix@hoverbear.org>
-
@astro Astro <astro@spaceboyz.net>
-
@happysalada Raphael Megzari <raphael@megzari.com>
-
@bcdarwin Ben Darwin <bcdarwin@gmail.com>