SecurityContext

CVE-2026-121748: Node Version Manager - Arbitrary File Write

  • Cve: CVE-2026-121748
  • Name: Node Version Manager - Arbitrary File Write
  • Description: Node Version Manager (nvm) is a POSIX-compliant shell function for managing multiple node.js versions. In versions 0.27.0 through 0.40.8, when a project's `.npmrc` sets `prefix`, `nvm use` tells the user to run `nvm use --delete-prefix`, which runs `npm config delete prefix` and `npm config delete globalconfig` in the current directory without naming a config file. npm loads the project `.npmrc` before deciding which file to edit, so that file chooses the target: `userconfig=~/.bashrc` makes npm rewrite `~/.bashrc` as ini (corrupting it), and `location=global` with `globalconfig=` leaves the chosen file at mode 0666, which on a shared machine lets another local user write to it. The attacker (the author of a cloned repository or archive, or a local user who can write a shared parent directory) chooses the file but not the bytes written, and no project code runs. Version 0.41.0 no longer lets a project `.npmrc` select which config file `--delete-prefix` edits.
  • Impact: Attackers can corrupt files like ~/.bashrc or set world-writable permissions on config files, potentially leading to code execution or privilege escalation.
  • Remediation: Upgrade to version 0.41.0 or later.
  • Vulnerability type: misconfiguration
  • Vulnerability impact: data_tampering, file_system_write
  • Requirement type: none
  • Labels source: securitycontext
  • Severity: low
  • Cvss score: 3.6
  • Cvss vector: CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:L
  • Epss score: 0.00127
  • Epss percentile: 0.02377
  • Assignee: 7ffcee3d-2c14-4c3e-b844-86c6a321a158
  • Published at: 2026-11-04T22:17:54Z
  • Age in days: 20
  • Modified at: 2026-11-10T21:46:30Z
  • Patch available: yes
  • References total: 2
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-121748
  • Nvd status: awaiting_analysis
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-73External Control of File Name or Path

References

UrlSourceTags
https://github.com/nvm-sh/nvm/commit/4049296ca8eef2067517d8cfd5ef5c0e615daa10nvd
https://github.com/nvm-sh/nvm/security/advisories/GHSA-ccgf-7gv4-xg5hnvd

Products

ProductAffectedPlatform boundSourcesUrl
openjsf:node_version_manager>= 0.27.0, < 0.41.0nocna_alias/v1/products/openjsf/node_version_manager

Projects

RepositoryLink kindsIndexedUrl
nvm-sh/nvmcommit, fix, security_advisoryyes/v1/repositories/nvm-sh/nvm

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, remote, authentication required
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts