The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2024-38519

CVE-2024-38519: yt-dlp Path Traversal Vulnerability

CVE-2024-38519 is a path traversal vulnerability in yt-dlp and youtube-dl that allows arbitrary file creation and potential code execution. This article covers the technical details, affected versions, and mitigation steps.

Updated: January 22, 2026

CVE-2024-38519 Overview

CVE-2024-38519 is an arbitrary code execution vulnerability affecting yt-dlp and youtube-dl, popular command-line audio/video downloaders. The vulnerability exists because these tools do not limit the extensions of downloaded files, which could lead to arbitrary filenames being created in the download folder. On Windows systems, this also enables path traversal attacks. Since both yt-dlp and youtube-dl read configuration files from the working directory, and Windows will execute binaries from the tool's directory, this vulnerability can be exploited to achieve arbitrary code execution.

Critical Impact

Attackers can craft malicious media URLs that cause arbitrary files to be written to the download directory with dangerous extensions, potentially leading to code execution when users run the tools from sensitive locations.

Affected Products

  • yt-dlp versions prior to 2024.07.01
  • youtube-dl versions prior to nightly builds tagged 2024-07-03
  • youtube-dl versions without commit d42a222 applied

Discovery Timeline

  • 2024-07-02 - CVE-2024-38519 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2024-38519

Vulnerability Analysis

This vulnerability stems from CWE-669 (Incorrect Resource Transfer Between Spheres), where yt-dlp and youtube-dl fail to properly validate and restrict file extensions during the download process. The lack of extension whitelisting allows attackers to craft malicious URLs that result in files being saved with arbitrary extensions, including executable formats like .exe, .bat, .cmd, or .dll on Windows systems.

The attack surface is particularly dangerous because both tools read configuration files from the current working directory. If a user downloads content to a directory that is in their system PATH, or to sensitive locations like their user directory or system32, an attacker-controlled file with an executable extension could be executed automatically or when the user next runs the tool.

Root Cause

The root cause lies in the insufficient input validation of file extensions derived from remote content. The applications trusted server-provided or URL-derived extension information without sanitizing or validating it against a list of safe, expected media file extensions. This allowed malicious actors to specify arbitrary extensions that the tools would blindly use when writing files to disk.

Attack Vector

The attack requires local access where a user must be tricked into downloading content from a malicious or compromised website. The attacker controls the file extension through the download URL or server response, and when combined with directory traversal on Windows, can write executable files to locations where they may be automatically executed. The attack succeeds when:

  1. The user downloads from a malicious source
  2. The output template doesn't enforce a safe extension
  3. The download occurs in a sensitive directory (PATH, user directory, system directories)

The security patches introduce an _UnsafeExtensionError class to block dangerous extensions from being downloaded:

python
     write_json_file,
     write_string,
 )
-from .utils._utils import _YDLLogger
+from .utils._utils import _UnsafeExtensionError, _YDLLogger
 from .utils.networking import (
     HTTPHeaderDict,
     clean_headers,

Source: yt-dlp Security Commit

The changelog was also updated to document the security fix:

text
         "when": "e6a22834df1776ec4e486526f6df2bf53cb7e06f",
         "short": "[ie/orf:on] Add `prefer_segments_playlist` extractor-arg (#10314)",
         "authors": ["seproDev"]
+    },
+    {
+        "action": "add",
+        "when": "6aaf96a3d6e7d0d426e97e11a2fcf52fda00e733",
+        "short": "[priority] Security: [[CVE-2024-10123](https://nvd.nist.gov/vuln/detail/CVE-2024-10123)] [Properly sanitize file-extension to prevent file system modification and RCE](https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-79w7-vh3h-8g4j)\n    - Unsafe extensions are now blocked from being downloaded"
     }
 ]

Source: yt-dlp Security Commit

Detection Methods for CVE-2024-38519

Indicators of Compromise

  • Unexpected executable files (.exe, .bat, .cmd, .dll, .ps1) appearing in download directories
  • Configuration files appearing in yt-dlp or youtube-dl working directories that were not created by the user
  • Files with path traversal sequences (e.g., ../) in filenames within download folders

Detection Strategies

  • Monitor file system activity for executable file creation in directories commonly used for media downloads
  • Implement application whitelisting to detect unauthorized executables in user download directories
  • Use endpoint detection and response (EDR) solutions to flag process execution from unusual locations such as media download folders
  • Audit installed versions of yt-dlp and youtube-dl across enterprise endpoints

Monitoring Recommendations

  • Enable file integrity monitoring on sensitive directories including system PATH locations, user profile directories, and system32
  • Configure SentinelOne behavioral AI to detect execution of binaries from non-standard locations
  • Set up alerts for yt-dlp or youtube-dl processes that spawn child processes or write executable files
  • Review download directories periodically for files with unexpected extensions

How to Mitigate CVE-2024-38519

Immediate Actions Required

  • Upgrade yt-dlp to version 2024.07.01 or later immediately
  • Upgrade youtube-dl to nightly builds tagged 2024-07-03 or later, or apply commit d42a222
  • Ensure the output template always ends with .%(ext)s to enforce proper extension handling
  • Never download content to directories within PATH, system32, or other sensitive binary locations

Patch Information

The vulnerability has been fixed through extension whitelisting in both tools. For yt-dlp, the fix is included in version 2024.07.01 and later. For youtube-dl, the fix is available in commit d42a222 on the master branch and in nightly builds tagged 2024-07-03 or later. Detailed security information is available in the yt-dlp Security Advisory and the youtube-dl Security Advisory.

Workarounds

  • Keep the default output template (-o "%(title)s [%(id)s].%(ext)s") to avoid custom template vulnerabilities
  • Verify that downloaded media extensions are common video/audio/subtitle formats before opening
  • Avoid using the generic extractor when possible, as it increases attack surface
  • Use --ignore-config --config-location /trusted/path/config to prevent loading configuration from untrusted locations
  • Only download from websites and sources that you explicitly trust
bash
# Recommended secure configuration
# Use explicit config location and safe output template
yt-dlp --ignore-config --config-location ~/.config/yt-dlp/config \
  -o "~/Downloads/videos/%(title)s [%(id)s].%(ext)s" \
  "https://trusted-site.com/video"

# For youtube-dl with similar protections
youtube-dl --ignore-config --config-location ~/.config/youtube-dl/config \
  -o "~/Downloads/videos/%(title)s [%(id)s].%(ext)s" \
  "https://trusted-site.com/video"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechYt Dlp

  • SeverityHIGH

  • CVSS Score7.8

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-669
  • Technical References
  • GitHub Security Advisory

  • GitHub Commit Update

  • GitHub Release Note

  • GitHub Security Advisory

  • GitHub Commit Update

  • GitHub Pull Request

  • GitHub Security Lab Advisory

  • GitHub Security Lab Advisory
  • Related CVEs
  • CVE-2026-26331: Yt-dlp Command Injection RCE Vulnerability

  • CVE-2024-22423: Yt-dlp Command Injection RCE Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English