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.

Published: 2026-02-24 Last update: 2026-02-25 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2026-26331 is rated High Exploit Risk (63/100): CVSS High severity, with low exploitation likelihood (EPSS 0.17%). Core evidence: 1 public exploit reference(s) are indexed (Exploit-DB). Mandatory action: Public exploits are available—assess exposure, apply mitigations, and prioritize patching.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Public exploit references (Exploit-DB) for CVE-2026-26331

EDB-ID Source Kind Published Link
nvd_ref exploit_tag Exploit-DB ↗

Exploit prediction scoring system (EPSS) score for CVE-2026-26331

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-03-21 0.70% 0.17% -0.53%
2 2026-03-02 0.60% 0.70% +0.10%
3 2026-02-26 0.60%

Full EPSS history (4 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2026-26331

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
8.8 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
2.8 5.9 [email protected]

Weakness enumeration for CVE-2026-26331

GitHub Security Advisory for CVE-2026-26331

GHSA-g3gw-q23r-pgqm · Severity: high · Ecosystem: pip — yt-dlp: Arbitrary Command Injection when using the `--netrc-cmd` option

OS Trackers for CVE-2026-26331

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

Affected software / configurations for CVE-2026-26331

Vendor Product Version Raw CPE
yt-dlp_project yt-dlp >= 2023.06.21, < 2026.02.21 cpe:2.3:a:yt-dlp_project:yt-dlp:*:*:*:*:*:*:*:*

References for CVE-2026-26331

cvelogic Threat Intelligence