{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2026-121748", "assignerOrgId": "7ffcee3d-2c14-4c3e-b844-86c6a321a158", "state": "PUBLISHED", "assignerShortName": "harborist", "dateReserved": "2026-11-03T23:38:59.224Z", "datePublished": "2026-11-04T21:29:25.656Z", "dateUpdated": "2026-11-09T20:46:20.936Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "7ffcee3d-2c14-4c3e-b844-86c6a321a158", "shortName": "harborist", "dateUpdated": "2026-11-04T21:29:25.656Z" }, "title": "nvm use --delete-prefix lets a project .npmrc choose which file npm rewrites or makes world-writable", "problemTypes": [ { "descriptions": [ { "lang": "en", "cweId": "CWE-73", "description": "CWE-73 External Control of File Name or Path", "type": "CWE" } ] } ], "affected": [ { "vendor": "nvm-sh", "product": "nvm", "repo": "https://github.com/nvm-sh/nvm", "versions": [ { "status": "affected", "version": "0.27.0", "lessThan": "0.41.0", "versionType": "semver" } ], "defaultStatus": "unaffected" } ], "descriptions": [ { "lang": "en", "value": "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.", "supportingMedia": [ { "type": "text/html", "base64": false, "value": "
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.
" } ] } ], "references": [ { "url": "https://github.com/nvm-sh/nvm/security/advisories/GHSA-ccgf-7gv4-xg5h", "name": "GHSA-ccgf-7gv4-xg5h", "tags": [ "vendor-advisory" ] }, { "url": "https://github.com/nvm-sh/nvm/commit/4049296ca8eef2067517d8cfd5ef5c0e615daa10", "name": "Fix commit 4049296c", "tags": [ "patch" ] } ], "metrics": [ { "format": "CVSS", "scenarios": [ { "lang": "en", "value": "GENERAL" } ], "cvssV4_0": { "attackVector": "LOCAL", "attackComplexity": "LOW", "attackRequirements": "PRESENT", "privilegesRequired": "NONE", "userInteraction": "ACTIVE", "vulnConfidentialityImpact": "NONE", "subConfidentialityImpact": "NONE", "vulnIntegrityImpact": "LOW", "subIntegrityImpact": "NONE", "vulnAvailabilityImpact": "LOW", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED", "version": "4.0", "baseSeverity": "LOW", "baseScore": 1.8, "vectorString": "CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N" } }, { "format": "CVSS", "scenarios": [ { "lang": "en", "value": "GENERAL" } ], "cvssV3_1": { "version": "3.1", "attackVector": "LOCAL", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "LOW", "availabilityImpact": "LOW", "baseSeverity": "LOW", "baseScore": 3.6, "vectorString": "CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:L" } } ], "workarounds": [ { "lang": "en", "value": "Until upgrading, do not run `nvm use --delete-prefix` in an untrusted project directory; remove the `prefix` setting from your own npmrc files by hand instead.", "supportingMedia": [ { "type": "text/html", "base64": false, "value": "Until upgrading, do not run `nvm use --delete-prefix` in an untrusted project directory; remove the `prefix` setting from your own npmrc files by hand instead.
" } ] } ], "solutions": [ { "lang": "en", "value": "Upgrade to nvm 0.41.0 or later.", "supportingMedia": [ { "type": "text/html", "base64": false, "value": "Upgrade to nvm 0.41.0 or later.
" } ] } ], "credits": [ { "lang": "en", "value": "Anthropic's OSS Scanner, as vulnerability ANT-2026-WYRTKBQ5", "type": "finder" }, { "lang": "en", "value": "Jordan Harband (https://github.com/ljharb)", "type": "remediation developer" } ], "source": { "advisory": "GHSA-ccgf-7gv4-xg5h", "discovery": "EXTERNAL" } }, "adp": [ { "metrics": [ { "other": { "type": "ssvc", "content": { "timestamp": "2026-11-09T20:46:07.350425Z", "id": "CVE-2026-121748", "options": [ { "Exploitation": "none" }, { "Automatable": "no" }, { "Technical Impact": "partial" } ], "role": "CISA Coordinator", "version": "2.0.3" } } } ], "title": "CISA ADP Vulnrichment", "providerMetadata": { "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "shortName": "CISA-ADP", "dateUpdated": "2026-11-09T20:46:20.936Z" } } ] } }