- Accueil
- Vulnérabilités
- CVE-2026-121746
CVE-2026-121746
nvm use --save and nvm install --save write through a symlinked .nvmrc, overwriting any file the user can write
Résumé
Node Version Manager (nvm) is a POSIX-compliant shell function for managing multiple node.js versions. In versions 0.40.0 through 0.40.8, `nvm use --save` and `nvm install --save` (or `-w`) write the resolved version to `$PWD/.nvmrc` with `tee`, which follows a symbolic link. A repository that commits `.nvmrc` as a symlink to a path outside itself (git recreates the link on clone) therefore makes `--save` truncate any file the user can write, such as a shell startup file or `~/.ssh/authorized_keys`, and replace its contents with the version string, or create the target of a dangling link; the link itself is left unchanged, so `git status` stays clean. The attacker does not control the content written, so this is data loss, not code execution. Version 0.41.0 refuses, with a warning, to write when `.nvmrc` in the current directory is a symlink, dangling or not, rather than writing through it or replacing it.
Aucune traduction française : description d’origine affichée.
Produits et versions affectés
nvm-sh (1 ligne(s))
| Produit | Versions | Corrigé dans | Source |
|---|---|---|---|
| nvm | de 0.40.0 (inclus) à 0.41.0 (exclu) |
— | CNA (éditeur ou attributeur) |
Correctif
Correctifsource officielle
Upgrade to nvm 0.41.0 or later.
Source : CNA (éditeur ou attributeur)
Contournement
Contournementsource officielle
Until upgrading, check that `.nvmrc` is not a symlink (`ls -l .nvmrc`) before running `nvm use --save` or `nvm install --save` in an untrusted project directory.
Source : CNA (éditeur ou attributeur)
Savoir si vous êtes touché
Exploit signalé par les sources
Ces liens sont étiquetés « exploit » par le NVD ou par CVE.org. Nous ne les avons pas vérifiés ni copiés ; ouvrez-les avec prudence.
Chronologie
- — Publication de la CVE (cve)
Références
Provenance des données
- Statut
- NVD
- Date de publication
- NVD
- Description
- CNA (éditeur ou attributeur)
- Score CVSS
- CNA (éditeur ou attributeur)
- Faiblesse (CWE)
- CNA (éditeur ou attributeur)
- Vecteur CVSS
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N(CVSS 3.1, CNA:harborist)- Faiblesse
- CWE-59 · Autre (CWE-59)