CVE-2026-26331 | yt-dlp: Arbitrary Command Injection when using the `--netrc-cmd` option

Exp

yt-dlp is a command-line audio/video downloader. Starting in version 2023.06.21 and prior to version 2026.02.21, when yt-dlp's `--netrc-cmd` command-line option (or `netrc_cmd` Python API parameter) is used, an attacker could achieve arbitrary command injection on the user's system with a maliciously crafted URL. yt-dlp maintainers assume the impact of this vulnerability to be high for anyone who uses `--netrc-cmd` in their command/configuration or `netrc_cmd` in their Python scripts. Even though the maliciously crafted URL itself will look very suspicious to many users, it would be trivial for a maliciously crafted webpage with an inconspicuous URL to covertly exploit this vulnerability via HTTP redirect. Users without `--netrc-cmd` in their arguments or `netrc_cmd` in their scripts are unaffected. No evidence has been found of this exploit being used in the wild. yt-dlp version 2026.02.21 fixes this issue by validating all netrc "machine" values and raising an error upon unexpected input. As a workaround, users who are unable to upgrade should avoid using the `--netrc-cmd` command-line option (or `netrc_cmd` Python API parameter), or they should at least not pass a placeholder (`{}`) in their `--netrc-cmd` argument.

公开: 2026-02-23 最后更新: 2026-06-17 分配方: [email protected] 来源: [email protected]

结论预警: CVE-2026-26331 综合评估为高可利用风险(77/100):CVSS 技术影响为高级,利用概率(EPSS 1.60%) 核心证据: 已收录 1 条公开利用参考(Exploit-DB)。 近一日 EPSS 上升 +1.43%,被利用关注度持续升高。 强制指令: 存在公开利用—请排查暴露面、落实缓解措施并优先修补。

风险随态势动态变化;本站持续评估并同步更新本页展示内容。

CVE-2026-26331 的公开 exploit 引用(Exploit-DB)

EDB-ID 来源 类型 公开时间 链接
nvd_ref exploit_tag Exploit-DB ↗

CVE-2026-26331 的 EPSS(利用预测评分)

EPSS 日更估计相对被利用可能性;百分位表示该 CVE 在已评分漏洞中的相对排名(越高表示相对更严重)。

# 日期 旧 EPSS 分数 新 EPSS 分数 变化(新 − 旧)
1 2026-06-15 0.17% 1.60% +1.43%
2 2026-03-21 0.70% 0.17% -0.53%
3 2026-03-02 0.70%

完整 EPSS 历史 (共 5 条)

CVE-2026-26331 的 CVSS 指标

该 CVE 的 CVSS 指标。

底座分 版本 严重度 向量 可利用性 影响 分数来源
8.8 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H 点击展开
攻击向量 (AV:N)
经互联网或企业内可路由网段即可从远端触达,攻击者不必出现在设备旁。
攻击复杂度 (AC:L)
前置条件清晰,成功路径稳定,不依赖罕见竞态或苛刻环境。
权限要求 (PR:N)
不必事先登录或提权,匿名会话也可能成为跳板。
用户交互 (UI:R)
需要一次明确的用户动作(安装、改配置、打开恶意文档等)才会落地。
作用域 (S:U)
破坏局限在脆弱组件原本的安全权限与信任域之内。
机密性影响 (C:H)
批量读取、导出或长期潜伏窃取机密数据,在实战上成立。
完整性影响 (I:H)
可篡改审计日志、植入后门或大面积伪造业务数据,动摇信任根基。
可用性影响 (A:H)
可造成长时间中断、关键事务无法完成,或伴随数据损毁导致难以自愈。
2.8 5.9 [email protected]

CVE-2026-26331 的弱点枚举

CVE-2026-26331 的 GitHub 安全公告

GHSA-g3gw-q23r-pgqm · 严重度: high · 生态: pip — yt-dlp: Arbitrary Command Injection when using the `--netrc-cmd` option

CVE-2026-26331 的 OS 跟踪

vendor priority summary link
alpine CVE-2026-26331: 1 source package rows (yt-dlp); 42 state rows across 2 repos (3.23-community, edge-community); fixed 0, open 42. https://security.alpinelinux.org/vuln/CVE-2026-26331
debian unimportant CVE-2026-26331 unimportant priority: Debian including 1 source packages (yt-dlp), 4 status rows across 4 suites (bookworm, forky, sid, trixie): resolved 3, open 1. https://security-tracker.debian.org/tracker/CVE-2026-26331
redhat high https://access.redhat.com/security/cve/CVE-2026-26331
ubuntu medium CVE-2026-26331 medium priority: Ubuntu including 1 source packages (yt-dlp), 4 status rows across 4 suites (jammy, noble, questing, upstream): needs-triage 4. https://ubuntu.com/security/CVE-2026-26331

CVE-2026-26331 的影响软件 / 配置

厂商 产品 版本 原始 CPE
yt-dlp_project yt-dlp >= 2023.06.21, < 2026.02.21 cpe:2.3:a:yt-dlp_project:yt-dlp:*:*:*:*:*:*:*:*

CVE-2026-26331 的参考链接

cvelogic Threat Intelligence