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
    • Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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-2025-43858

CVE-2025-43858: YoutubeDLSharp RCE Vulnerability

CVE-2025-43858 is a remote code execution flaw in YoutubeDLSharp that enables command injection on Windows when using default settings. This article covers the technical details, affected versions, and mitigation steps.

Updated: January 22, 2026

CVE-2025-43858 Overview

CVE-2025-43858 is a command injection vulnerability affecting YoutubeDLSharp, a popular .NET wrapper library for the command-line video downloaders youtube-dl and yt-dlp. The vulnerability exists in versions starting from 1.0.0-beta4 through versions prior to 1.1.2, where an unsafe conversion of arguments allows the injection of malicious commands when starting yt-dlp from a command prompt running on Windows OS.

The vulnerable behavior is tied to the UseWindowsEncodingWorkaround configuration value, which is set to true by default. When users leverage the built-in methods from the YoutubeDL.cs file, this default setting cannot be disabled through those methods, leaving applications exposed to potential exploitation.

Critical Impact

Attackers can inject arbitrary commands through maliciously crafted input, potentially leading to complete system compromise on Windows systems running vulnerable versions of YoutubeDLSharp.

Affected Products

  • YoutubeDLSharp versions 1.0.0-beta4 through 1.1.1
  • Applications using built-in methods from YoutubeDL.cs with default configurations
  • Windows systems running yt-dlp through affected YoutubeDLSharp wrappers

Discovery Timeline

  • April 24, 2025 - CVE-2025-43858 published to NVD
  • April 29, 2025 - Last updated in NVD database

Technical Details for CVE-2025-43858

Vulnerability Analysis

This command injection vulnerability (CWE-77) stems from unsafe argument handling when YoutubeDLSharp invokes the underlying yt-dlp executable on Windows systems. The root issue lies in the UseWindowsEncodingWorkaround feature, which was designed to support Unicode characters in output filenames by routing commands through cmd.exe. However, this implementation introduced a critical security flaw by allowing unsanitized user input to be interpreted as shell commands.

When the workaround is enabled (the default behavior), arguments passed to yt-dlp are processed in a way that permits command separator characters and shell metacharacters to break out of the intended command context. An attacker who can control input parameters such as URLs or output filenames can inject additional commands that will be executed with the privileges of the running process.

Root Cause

The vulnerability originates from the YoutubeDLProcess.cs file, where the UseWindowsEncodingWorkaround property was defined with a default value of true. This setting caused all yt-dlp invocations to be wrapped in a cmd.exe call to handle non-ASCII characters, but without proper escaping or sanitization of the arguments being passed. The Exec option in YoutubeDL.cs used echo outfile: {} to capture output filenames, which could be exploited through command injection when combined with the Windows encoding workaround.

Attack Vector

The attack vector is local, requiring an attacker to influence input that gets passed to YoutubeDLSharp's download or processing methods. This could occur in scenarios where:

  • A web application accepts user-supplied URLs for video downloading
  • An application processes playlist files or URLs from untrusted sources
  • Configuration parameters can be manipulated by malicious actors

The following patch shows the removal of the vulnerable UseWindowsEncodingWorkaround property:

text
         /// </summary>
         public string ExecutablePath { get; set; }
 
-        /// <summary>
-        /// Windows only. If set to true, start process via cmd.exe to support Unicode chars.
-        /// </summary>
-        public bool UseWindowsEncodingWorkaround { get; set; } = true;
-
         /// <summary>
         /// Occurs each time yt-dlp writes to the standard output.
         /// </summary>

Source: GitHub Commit

The fix also replaced the vulnerable Exec option with a safer Print approach:

text
                 NoOverwrites = !this.OverwriteFiles,
                 NoPart = true,
                 FfmpegLocation = Utils.GetFullPath(this.FFmpegPath),
-                Exec = "echo outfile: {}"
+                Print = "after_move:outfile: %(filepath)s"
             };
         }

Source: GitHub Commit

Detection Methods for CVE-2025-43858

Indicators of Compromise

  • Unexpected cmd.exe child processes spawned by applications using YoutubeDLSharp
  • Anomalous command-line arguments containing shell metacharacters such as &, |, ;, or $()
  • Process execution chains showing yt-dlp or youtube-dl followed by suspicious secondary processes
  • Log entries showing URLs or filenames with embedded command sequences

Detection Strategies

  • Monitor process creation events for cmd.exe instances spawned by .NET applications that use YoutubeDLSharp
  • Implement application-level logging to capture all URLs and parameters passed to video download functions
  • Use endpoint detection rules to identify command injection patterns in process arguments
  • Review application dependencies and check for YoutubeDLSharp versions between 1.0.0-beta4 and 1.1.1

Monitoring Recommendations

  • Configure SentinelOne to alert on suspicious process trees involving video download utilities followed by shell execution
  • Enable command-line argument logging for all yt-dlp and youtube-dl invocations
  • Deploy static analysis rules to identify applications using vulnerable YoutubeDLSharp versions
  • Monitor network traffic for unusual patterns following video download requests

How to Mitigate CVE-2025-43858

Immediate Actions Required

  • Upgrade YoutubeDLSharp to version 1.1.2 or later immediately
  • Audit all applications that depend on YoutubeDLSharp for affected versions
  • Implement strict input validation on all URLs and parameters passed to video download functions
  • Consider temporarily disabling video download functionality until the patch is applied

Patch Information

The vulnerability has been addressed in YoutubeDLSharp version 1.1.2. The fix removes the problematic UseWindowsEncodingWorkaround functionality entirely and replaces the vulnerable Exec option with a safer Print approach for capturing output filenames. Detailed information about the patches can be found in the GitHub Security Advisory.

Workarounds

  • If immediate upgrade is not possible, avoid processing untrusted URLs or user-supplied input through YoutubeDLSharp
  • Implement a strict allowlist for URL domains that can be processed
  • Deploy application-level input sanitization to filter command injection characters before they reach YoutubeDLSharp
  • Consider running video download operations in a sandboxed environment with limited privileges
bash
# Update YoutubeDLSharp via NuGet Package Manager
dotnet add package YoutubeDLSharp --version 1.1.2

# Verify installed version
dotnet list package | grep YoutubeDLSharp

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechYoutubedlsharp

  • SeverityCRITICAL

  • CVSS Score9.2

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-77
  • Technical References
  • GitHub Commit Update

  • GitHub Commit Update

  • GitHub Security Advisory
  • Latest CVEs
  • CVE-2025-9185: Mozilla Firefox RCE Vulnerability

  • CVE-2025-9184: Mozilla Firefox RCE Vulnerability

  • CVE-2025-9180: Mozilla Firefox Auth Bypass Vulnerability

  • CVE-2025-8030: Mozilla Firefox RCE Vulnerability
Default Legacy - Prefooter | 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