Read the docs
TI-2024-25754 Aliases CVE-2024-38519GHSA-79w7-vh3h-8g4j

yt-dlp and youtube-dl vulnerable to file system modification and RCE through improper file-extension sanitization

Priority HIGH 69CWE-669Published · Updated

Key facts

Attack vector
Local
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-434.

Summary

`yt-dlp` and `youtube-dl` are command-line audio/video downloaders. Prior to the fixed versions, `yt-dlp` and `youtube-dl` do not limit the extensions of downloaded files, which could lead to arbitrary filenames being created in the download folder (and path traversal on Windows). Since `yt-dlp` and `youtube-dl` also read config from the working directory (and on Windows executables will be executed from the `yt-dlp` or `youtube-dl` directory), this could lead to arbitrary code being executed. `yt-dlp` version 2024.07.01 fixes this issue by whitelisting the allowed extensions. `youtube-dl` fixes this issue in commit `d42a222` on the `master` branch and in nightly builds tagged 2024-07-03 or later. This might mean some very uncommon extensions might not get downloaded, however it will also limit the possible exploitation surface. In addition to upgrading, have `.%(ext)s` at the end of the output template and make sure the user trusts the websites that they are downloading from. Also, make sure to never download to a directory within PATH or other sensitive locations like one's user directory, `system32`, or other binaries locations. For users who are not able to upgrade, keep the default output template (`-o "%(title)s [%(id)s].%(ext)s`); make sure the extension of the media to download is a common video/audio/sub/... one; try to avoid the generic extractor; and/or use `--ignore-config --config-location ...` to not load config from common locations.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00325 25th percentileScored 2026-11-07
Fix Fixed yt-dlp (yt-dlp): 2024.07.01youtube-dl (ytdl-org): 2024-07-03+1 more product

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
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-dlp< 2024.07.01 to before 2024.07.012024.07.01Patch availableCNA
ytdl-orgyoutube-dl>= 2015.01.25 – 2021.12.17; nightly to before 2024-07-032024-07-03Patch availableCNA
—yt-dlp (PyPI)before 2024.07.012024.07.01Patch availableGHSA-79w7-vh3h-8g4j
  • yt-dlp Vendoryt-dlp Affected < 2024.07.01 to before 2024.07.01 Fixed in 2024.07.01 Patch available CNA
  • youtube-dl Vendorytdl-org Affected >= 2015.01.25 – 2021.12.17; nightly to before 2024-07-03 Fixed in 2024-07-03 Patch available CNA
  • yt-dlp (PyPI) Vendor— Affected before 2024.07.01 Fixed in 2024.07.01 Patch available GHSA-79w7-vh3h-8g4j

CPE names CISA-ADP · 1

CPEVersionsRoleVendor
cpe:2.3:a:yt-dlp_project:yt-dlp:-:*:*:*:*:*:*:*not specified by CISA-ADP—yt-dlp
  • cpe:2.3:a:yt-dlp_project:yt-dlp:-:*:*:*:*:*:*:* Versions not specified by CISA-ADP — ·yt-dlp

Remediation

  • Fix · CNA yt-dlp (yt-dlp) Fixed in 2024.07.01
  • Fix · CNA youtube-dl (ytdl-org) Fixed in 2024-07-03
  • Fix · GHSA-79w7-vh3h-8g4j yt-dlp (PyPI) Fixed in 2024.07.01 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-2024-38519
  2. 2026-10-03 Alias added: GHSA-79w7-vh3h-8g4j

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-21287 yt-dlp: Arbitrary Command Injection when using the `--netrc-cmd` option CVSS 3.1HIGH 8.8
  • TI-2026-37295 yt-dlp: Arbitrary code execution via manifest downloads with aria2c CVSS 3.1CRITICAL 9.6
See all 11 →

Sources