Yewtube: yt-dlp File system modification and RCE through improper file-extension sanitization (CVE-2024-38519)
yt-dlp versions from 2.10.5 up to but not including 2.10.5_5 do not restrict file extensions for downloaded files, allowing creation of arbitrary filenames including executables. Because yt-dlp reads configuration files from the working directory and executes Windows executables found there, this can lead to arbitrary code execution. The issue is fixed in yt-dlp version 2024.07.01 by whitelisting allowed extensions. Users are advised to upgrade and follow recommended safe usage practices to mitigate risk.
AI Analysis
Technical Summary
yt-dlp improperly sanitizes file extensions of downloaded files, allowing arbitrary filenames including executables to be created in the download folder. On Windows, this can lead to path traversal and execution of malicious executables or configuration files (e.g., yt-dlp.conf) containing commands. The vulnerability is addressed in yt-dlp version 2024.07.01 by implementing a whitelist of allowed file extensions, reducing the attack surface. Exploitation involves tricking yt-dlp into downloading files with dangerous extensions such as .exe or .conf, which can then be executed on subsequent runs.
Potential Impact
An attacker can cause yt-dlp to create files with arbitrary names and extensions in the download directory, including executables or configuration files. This can lead to arbitrary code execution when yt-dlp is run again, especially on Windows systems where executables in the working directory are executed. The impact includes full compromise of the user environment running yt-dlp.
Mitigation Recommendations
A fix is available in yt-dlp version 2024.07.01, which should be applied promptly. Users should always include '.%(ext)s' at the end of output templates and avoid downloading to directories in the system PATH or other sensitive locations. For those unable to upgrade immediately, restrict downloads to common media extensions, avoid generic extractors, use default output templates, omit subtitle options, and avoid loading configuration files from common locations using '--ignore-config --config-location ...'.
Yewtube: yt-dlp File system modification and RCE through improper file-extension sanitization (CVE-2024-38519)
Description
yt-dlp versions from 2.10.5 up to but not including 2.10.5_5 do not restrict file extensions for downloaded files, allowing creation of arbitrary filenames including executables. Because yt-dlp reads configuration files from the working directory and executes Windows executables found there, this can lead to arbitrary code execution. The issue is fixed in yt-dlp version 2024.07.01 by whitelisting allowed extensions. Users are advised to upgrade and follow recommended safe usage practices to mitigate risk.
CVSS v3.1
Score 7.8high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
yt-dlp improperly sanitizes file extensions of downloaded files, allowing arbitrary filenames including executables to be created in the download folder. On Windows, this can lead to path traversal and execution of malicious executables or configuration files (e.g., yt-dlp.conf) containing commands. The vulnerability is addressed in yt-dlp version 2024.07.01 by implementing a whitelist of allowed file extensions, reducing the attack surface. Exploitation involves tricking yt-dlp into downloading files with dangerous extensions such as .exe or .conf, which can then be executed on subsequent runs.
Potential Impact
An attacker can cause yt-dlp to create files with arbitrary names and extensions in the download directory, including executables or configuration files. This can lead to arbitrary code execution when yt-dlp is run again, especially on Windows systems where executables in the working directory are executed. The impact includes full compromise of the user environment running yt-dlp.
Mitigation Recommendations
A fix is available in yt-dlp version 2024.07.01, which should be applied promptly. Users should always include '.%(ext)s' at the end of output templates and avoid downloading to directories in the system PATH or other sensitive locations. For those unable to upgrade immediately, restrict downloads to common media extensions, avoid generic extractors, use default output templates, omit subtitle options, and avoid loading configuration files from common locations using '--ignore-config --config-location ...'.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BREW-yewtube-CVE-2024-38519
- Osv Schema Version
- 1.7.3
- Ecosystems
- ["Homebrew"]
- Cvss Version
- 3.1
Threat ID: 6aac8e7055bf5e2cf5491ee5
Added to database: 09/18/2026, 01:05:52 UTC
Last enriched: 09/18/2026, 01:57:20 UTC
Last updated: 09/18/2026, 02:06:23 UTC
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.