目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2026-118905— nvm_ls GNU sed 远程命令执行漏洞

一分钟漏洞结论

影响对象
nvm-sh nvm
利用判断
尚无明确在野利用证据,仍需结合暴露面评估
建议动作
优先检查厂商安全公告和参考链接中的修复版本;无法立即升级时,限制受影响服务暴露并加强监测。

Node Version Manager(nvm)是一个符合 POSIX 标准的 Shell 函数,用于管理多个 Node.js 版本。在 0.31.2 至 0.40.5 版本中, 函数使用一个 sed 程序来过滤已安装的版本;该程序将请求的版本模式嵌入到 形式的地址中,并对 进行转义(自 0.40.4 起也对 进行转义),但未对反斜杠 进行转义。因此,若版本字符串中包含 或 ,会导致地址提前闭合,剩余部分被解析为 sed 命令:在 GNU sed 中, 命令会以当前用户身份执行 Shell 命令;在 BSD se

CVSS 7.0 · High
获取后续新漏洞提醒 登录后订阅

一、 漏洞 CVE-2026-118905 基础信息

漏洞信息

对漏洞内容有疑问?看看神龙的深度分析是否有帮助!
查看神龙十问 ↗

尽管我们使用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。神龙努力确保数据的准确性,但请您根据实际情况进行核实和判断。

Vulnerability Title
nvm_ls lets an untrusted version string inject sed commands, executing arbitrary commands with GNU sed
来源: CVE Program / CVE List V5
Vulnerability Description
Node Version Manager (nvm) is a POSIX-compliant shell function for managing multiple node.js versions. In versions 0.31.2 through 0.40.5, `nvm_ls` filters installed versions with a sed program that embeds the requested version pattern in a `\#...#` address, escaping `.` (and, since 0.40.4, `#`) but not backslash. A version string containing `#` (or `\#`) therefore closes the address early, and the rest of it is parsed as sed commands: with GNU sed, the `e` command runs a shell command as the user; with BSD sed, the `w` and `r` commands write and read files. This is reachable whenever an attacker-influenced version string is passed to `nvm use`, `nvm which`, `nvm ls`, `nvm version`, `nvm run`, or `nvm exec`, or to `nvm-exec` via `NODE_VERSION`, and at least one version is installed. nvm's own `.nvmrc` parser strips comments, so a bare `nvm use` is not affected; however, the bash `cdnvm` and zsh `load-nvmrc` auto-switch hooks documented in the README read `.nvmrc` as-is and pass it to `nvm ls` and `nvm version`, so a user with one of those hooks installed runs the attacker's command just by changing into a directory under a malicious `.nvmrc`; scripts that run `nvm use "$(cat .nvmrc)"` are affected the same way. Version 0.40.6 passes any version pattern containing `#` or a newline through the `.nvmrc` content parser first, so no `#` reaches the sed program.
来源: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
来源: CVE Program / CVE List V5
Vulnerability Type
OS命令中使用的特殊元素转义处理不恰当(OS命令注入)
来源: CVE Program / CVE List V5

受影响产品

厂商 产品 影响版本 CPE 订阅
nvm-sh nvm 0.31.2 ~ 0.40.6 -

二、漏洞 CVE-2026-118905 的公开POC

# POC 描述 源链接 神龙链接
AI 生成 POC 高级

未找到公开 POC。

登录以生成 AI POC

三、漏洞 CVE-2026-118905 的情报信息

请登录查看更多情报信息。

CVE-2026-118905 其他参考 (4)

IV. Related Vulnerabilities