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

Source: https://junglewise.ai/threats/cve-2026-26331-yt-dlp-arbitrary-command-injection-when-using-the-netrc-cmd  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-13  
License: CC BY 4.0 with a link back

CVE-2026-26331 · Severity: low · CVSS 3.1 · Published 2026-07-13

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

Technologies: [yt-dlp (PyPI)](https://junglewise.ai/threats/technologies/yt-dlp). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-26331 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-26331 being exploited in the wild.

**How severe is CVE-2026-26331?** Low severity, with a CVSS score of 3.1, published 13 July 2026.

**Which products and versions are affected?** yt-dlp (PyPI) ECOSYSTEM:introduced=2023.06.21,fixed=2026.02.21.

**Is there a fix for CVE-2026-26331?** Yes. yt-dlp (PyPI): upgrade to 2026.02.21 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2026-26331?** Check whether you run yt-dlp (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- yt-dlp (PyPI): upgrade to 2026.02.21 or later

  ```sh
  pip install "yt-dlp>=2026.02.21"
  ```


## Affected products

- yt-dlp (PyPI) ECOSYSTEM:introduced=2023.06.21,fixed=2026.02.21

## Identifiers

- CVE-2026-26331
- GHSA-g3gw-q23r-pgqm
- PYSEC-2026-3432

## Related threats

- [yt-dlp and youtube-dl command injection in shortcut file generation](https://junglewise.ai/threats/cve-2026-55404-yt-dlp-and-youtube-dl-command-injection-in-shortcut-file)
- [PYSEC-2026-2065 - yt-dlp File system modification and RCE through improper file-extension sanitization](https://junglewise.ai/threats/cve-2024-38519-yt-dlp-file-system-modification-and-rce-through-improper-file)
- [PYSEC-2026-2066 - yt-dlp: `--exec` command injection when using `%q` in yt-dlp on Windows (Bypass of )](https://junglewise.ai/threats/cve-2024-22423-yt-dlp-exec-command-injection-when-using-q-in-yt-dlp-on-windows)
- [PYSEC-2026-2063 - yt-dlp Generic Extractor MITM Vulnerability via Arbitrary Proxy Injection](https://junglewise.ai/threats/cve-2023-46121-yt-dlp-generic-extractor-mitm-via-arbitrary-proxy-injection)
- [PYSEC-2026-2064 - yt-dlp on Windows vulnerable to `--exec` command injection when using `%q`](https://junglewise.ai/threats/cve-2023-40581-yt-dlp-on-windows-vulnerable-to-exec-command-injection-when-using)
