CVE-2024-38519

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

HIGH
7.8
CVSS Score
Published: July 2, 2024 at 01:47 PM UTC
Updated: June 17, 2026 at 07:40 AM UTC
3 products affected across 3 vendorsYt DlpYt DlpYouTube Dl

Using yt-dlp by yt-dlp?

Get instant alerts when new vulnerabilities affect yt-dlp - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.3%
SSVC
PoC

Description

`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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 2024.07.01
Affected range stops below 2024.07.01, so it looks safe — our inference, not a vendor statement
< 2024.07.01 ≤ v < 2024.07.01
Affected range stops below 2024.07.01, so it looks safe — our inference, not a vendor statement
>= 2015.01.25 ≤ v ≤ 2021.12.17nightly ≤ v < 2024-7-3>= 2015.01.25nightly
Affected range stops below 2024-7-3, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet, and no fixed version or vendor advisory is recorded against it.

SSVC — Action Prioritization

SSVCPoCNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

7.8HIGHGitHub_M
Attack Vector
LOCAL
Complexity
LOW
Privileges
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusDEFERRED
CWE
CWE-669

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card