Read the docs
TI-2026-21287 Aliases CVE-2026-26331GHSA-g3gw-q23r-pgqm

yt-dlp: Arbitrary Command Injection when using the `--netrc-cmd` option

Priority MEDIUM 44CWE-78Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-78.

Summary

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.0182 78th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed yt-dlp (yt-dlp): 2026.02.21yt-dlp (PyPI): 2026.02.21

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
yt-dlpyt-dlp2023.06.21 to before 2026.02.212026.02.21Patch availableCNA
—yt-dlp (PyPI)2023.06.21 to before 2026.02.212026.02.21Patch availableGHSA-g3gw-q23r-pgqm
  • yt-dlp Vendoryt-dlp Affected 2023.06.21 to before 2026.02.21 Fixed in 2026.02.21 Patch available CNA
  • yt-dlp (PyPI) Vendor— Affected 2023.06.21 to before 2026.02.21 Fixed in 2026.02.21 Patch available GHSA-g3gw-q23r-pgqm

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:yt-dlp_project:yt-dlp:*:*:*:*:*:*:*:*2023.06.21 to before 2026.02.21Vulnerableyt-dlp
  • cpe:2.3:a:yt-dlp_project:yt-dlp:*:*:*:*:*:*:*:* Versions 2023.06.21 to before 2026.02.21 Vulnerable ·yt-dlp

Remediation

  • Fix · CNA yt-dlp (yt-dlp) Fixed in 2026.02.21
  • Fix · GHSA-g3gw-q23r-pgqm yt-dlp (PyPI) Fixed in 2026.02.21 Advisory →

Vendor assessments

Red Hat

Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-26331
  2. 2026-10-03 Alias added: GHSA-g3gw-q23r-pgqm

References

  • TI-2024-03325 Command injection vulnerability in programing languages on Microsoft Windows operating system. CVSS 3.1CRITICAL 9.8
  • TI-2026-36849 yt-dlp: Dangerous file type creation via insufficient filename sanitization (Bypass of CVE-2024-38519) CVSS 3.1CRITICAL 9.6
  • TI-2025-33915 yt-dlp allows `--exec` command injection when using placeholder on Windows CVSS 3.1HIGH 8.1
  • TI-2024-14996 yt-dlp `--exec` command injection when using `%q` in yt-dlp on Windows CVSS 3.1CRITICAL 9.8
  • TI-2026-37295 yt-dlp: Arbitrary code execution via manifest downloads with aria2c CVSS 3.1CRITICAL 9.6
  • TI-2026-39974 yt-dlp: Downstream command injection via improper sanitization of yt-dlp --write-link output CVSS 3.1HIGH 8.8
See all 10 →

Sources