Files
nvm/test/fast/Unit tests
Jordan Harband 2abfc380ad [Fix] nvm_download: pass a mirror URL with credentials to curl and GNU Wget on stdin, not as an argument
903e3493 moved `$NVM_AUTH_HEADER` out of the downloader's arguments,
but a mirror URL with `user:password@` in it was still one,
so any local user could read the password in `ps` or /proc/<pid>/cmdline
for every index.tab, SHASUMS, and tarball request.
curl now gets such a URL as `url = "..."` in the config it already reads with `--config -`,
with `"` and `\` escaped;
GNU Wget reads it with `--input-file=-`,
including in the same-origin redirect loop.
A URL with whitespace or a control character cannot be one config line, and stays an argument.
BusyBox wget has no way to take a URL other than as an argument; the README says so.

Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-MNDN98RD.
2026-11-16 15:15:25 -08:00
..