Technical impact
The vulnerability occurs in nvm versions 0.40.0 through 0.40.8 when the --save option writes the resolved Node.js version using tee, following a symbolic link. If .nvmrc is a symlink pointing outside the repository, the write operation overwrites the target file, which the user can modify, potentially deleting or corrupting startup scripts or authorized_keys. The attacker cannot influence the content written; the result is data loss or accidental overwrite, not code execution.
Affected Systems
Node Version Manager (nvm) 0.40.0 through 0.40.8 is affected. Versions 0.41.0 and later address the issue by refusing to write when .nvmrc is a symlink. The product is maintained by nvm‑sh. Users on any platform running these affected nvm releases are vulnerable.
Risk and Exploitability
The CVSS score of 6.7 indicates a moderate impact. EPSS score is not available, so the likelihood of exploitation remains uncertain, but the issue is not listed in the CISA KEV catalog. Exploitation requires the attacker to place a symlinked .nvmrc in a repository that the user will clone or otherwise place in a writable directory, and that the user runs nvm use --save or nvm install --save. A typical social engineering or supply‑chain attack could achieve this. Because the vulnerability only overwrites data, the risk is primarily accidental corruption rather than a remote exploitation vector.