{"id":"CVE-2026-121747","kind":"vulnerability","aliases":["CVE-2026-121747"],"related":[],"title":"nvm: symlinked .nvmrc leaks local file contents to terminal output","description":"Node Version Manager (nvm) is a POSIX-compliant shell function for managing multiple node.js versions. In versions 0.2.0 through 0.40.8, nvm does not check whether `.nvmrc` is a symbolic link. A repository or archive that ships `.nvmrc` as a symlink to another file (for example `../../.npmrc`, or `/proc/self/environ` on Linux) makes a plain `nvm use`, `nvm install`, `nvm which`, `nvm exec`, `nvm run`, or `nvm-exec` read that file and print its contents in the invalid-`.nvmrc` message (even with `--silent`) or, for a one-line file, in the `Found ... with version <...>` message; with the README's zsh `load-nvmrc` or bash `cdnvm` hook installed, entering the directory is enough. nvm sends the content nowhere; the attacker learns it only where they can see the victim's output, such as a CI log for a contributed branch. Version 0.41.0 still follows a symlinked `.nvmrc`, so deliberate links to another version file keep working, but never prints its content, and accepts it only if it contains a version or the name of an existing alias; the README's bash `cdnvm` hook, which read `.nvmrc` itself, now gets the version from nvm, so users of that hook must also update their copy of it.","summary":"Node Version Manager (nvm) follows a symbolic link named .nvmrc without checking it, so a repository can point it at another file such as .npmrc or /proc/self/environ. nvm then prints that file's contents in its error or version messages, where an attacker who can read the victim's output, such as a CI log, can see them.","severity":"medium","cvss":6.7,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["bash","ci","node.js","nvm","package","shell","zsh"],"not_affected_if":["default-config","no-symlinked-nvmrc","trusted-repos-only"],"how_to_check":"- Run `nvm --version` and compare against the fixed release below.\n- Look for a `.nvmrc` that is a symbolic link in repositories you clone or build, using `ls -l .nvmrc`.\n- Check whether your shell loads nvm with the zsh `load-nvmrc` or bash `cdnvm` hook.","fix":null,"status":"open","published_at":"2026-11-04T22:17:54+00:00","first_seen_at":"2026-11-04T23:08:47+00:00","triaged_at":"2026-11-04T23:10:00+00:00","updated_at":"2026-11-04T23:10:00+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-11-04T23:10:00Z","model":"claude-haiku-5-5","output":{"fix":"- nvm: `0.41.0` (versions 0.2.0 through 0.40.8 are affected)\n- Users of the README's bash `cdnvm` hook must also update their copy of that hook.","reach":"local","title":"nvm: symlinked .nvmrc leaks local file contents to terminal output","impact":"low","summary":"Node Version Manager (nvm) follows a symbolic link named .nvmrc without checking it, so a repository can point it at another file such as .npmrc or /proc/self/environ. nvm then prints that file's contents in its error or version messages, where an attacker who can read the victim's output, such as a CI log, can see them.","audience":"developers","category":"package","nicknames":[],"who_cares":["nvm","node.js","ci","shell","zsh","bash"],"confidence":0.8,"fix_status":"available","needs_auth":"no","worst_case":"local file contents such as secrets printed to terminal output","analyst_note":"","how_to_check":"- Run `nvm --version` and compare against the fixed release below.\n- Look for a `.nvmrc` that is a symbolic link in repositories you clone or build, using `ls -l .nvmrc`.\n- Check whether your shell loads nvm with the zsh `load-nvmrc` or bash `cdnvm` hook.","plain_action":"","needs_analyst":false,"not_affected_if":["default-config","trusted-repos-only","no-symlinked-nvmrc"],"who_is_affected":"Anyone who runs nvm on a repository or archive they did not write, especially CI jobs building contributed branches, and shells with the zsh load-nvmrc or bash cdnvm hook enabled, where simply entering a directory triggers the read. Plain nvm use or install in a trusted repository without a symlinked .nvmrc is not exposed. The sources do not say which CI systems or default configurations are most at risk.","user_interaction":"yes","needs_special_setup":"no","severity_if_unknown":"medium"},"cost_usd":0.0008,"input_tokens":4610,"output_tokens":679,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-121747':13A,16A '-2026':12A,15A '/../.npmrc':127C '/proc/self/environ':50B,129C '0.2.0':99C '0.40.8':101C '0.41.0':223C 'accept':244C 'alia':258C 'also':281C 'anoth':44B,123C,233C 'archiv':115C 'attack':66B,201C 'bash':17B,186C,262C 'branch':221C 'cdnvm':187C,263C 'check':35B,105C 'ci':18B,77B,216C 'compliant':89C 'contain':249C 'content':7A,57B,155C,198C,242C 'contribut':220C 'copi':284C 'cve':11A,14A 'deliber':230C 'directori':192C 'enough':194C 'enter':190C 'error':60B 'even':161C 'exampl':126C 'exec':142C,148C 'exist':257C 'file':6A,45B,55B,124C,151C,170C,235C 'follow':28B,225C 'found':173C 'function':91C 'get':270C 'hook':188C,264C,279C 'instal':138C,189C 'invalid':158C 'keep':236C 'leak':4A 'learn':202C 'line':169C 'link':31B,111C,231C 'linux':131C 'load':183C 'load-nvmrc':182C 'local':5A 'log':78B,217C 'make':132C 'manag':26B,83C,93C 'messag':63B,160C,176C 'multipl':94C 'must':280C 'name':32B,254C 'never':239C 'node':24B,81C 'node.js':19B,95C 'nowher':199C 'npmrc':48B 'nvm':1A,20B,27B,51B,84C,102C,135C,137C,139C,141C,143C,147C,195C,274C 'nvm-exec':146C 'nvmrc':3A,33B,107C,118C,159C,184C,228C,267C 'one':168C 'one-lin':167C 'output':10A,73B,212C 'packag':21B 'plain':134C 'point':41B 'posix':88C 'posix-compli':87C 'print':53B,153C,240C 'read':69B,149C,266C 'readm':179C,260C 'repositori':39B,113C 'run':144C 'see':80B,208C 'send':196C 'shell':22B,90C 'ship':117C 'silent':163C 'still':224C 'symbol':30B,110C 'symlink':2A,121C,227C 'termin':9A 'updat':282C 'use':136C 'user':276C 'version':25B,62B,82C,96C,98C,175C,222C,234C,251C,272C 'victim':71B,210C 'whether':106C 'without':34B 'work':237C 'zsh':23B,181C","nicknames":[],"mitigations":[],"who_affected":"Anyone who runs nvm on a repository or archive they did not write, especially CI jobs building contributed branches, and shells with the zsh load-nvmrc or bash cdnvm hook enabled, where simply entering a directory triggers the read. Plain nvm use or install in a trusted repository without a symlinked .nvmrc is not exposed. The sources do not say which CI systems or default configurations are most at risk.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"unknown","audience":"developers","plain_action":null,"pkeys":[],"ptokens":[],"labels":["bash","ci","medium","nodejs","nvm","package","shell","zsh"],"campaign_type":null,"first_public_at":"2026-11-04T21:30:39+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"7ffcee3d-2c14-4c3e-b844-86c6a321a158","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-121747","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-121747","severity":null,"published_at":"2026-11-04T22:17:54+00:00","modified_at":"2026-11-04T22:17:54+00:00","first_seen_at":"2026-11-04T23:08:47+00:00","fetched_at":"2026-11-04T23:08:47+00:00","note":null}],"documents":[{"id":71132,"url":"https://github.com/nvm-sh/nvm/commit/67268ebcb6e1a26ae3d71b3710d6333bb7358662","title":"Patch: github.com","kind":"other","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":71133,"url":"https://github.com/nvm-sh/nvm/commit/c314f1cbb3c301c587a4e4f96511d31f1134ffd1","title":"Patch: github.com","kind":"other","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":71134,"url":"https://github.com/nvm-sh/nvm/security/advisories/GHSA-j6ch-mq5c-3h4x","title":"Vendor advisory: github.com","kind":"vendor","source":"nvd","publisher":"vendor","text":null,"published_at":"2026-11-04T21:30:39+00:00","relation":"advisory","confidence":null,"note":"Vendor advisory: github.com"}],"exploit_sources":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}