CVE-2026-50574: yt-dlp aria2c Arbitrary File Write and Code Execution
yt-dlp, a popular command-line tool for downloading audio and video from the web, contains a security flaw that allows attackers to write arbitrary files to a system when the aria2c external downloader is used with fragmented video formats like HLS or DASH streams. On Windows, this can lead to immediate code execution; on other platforms, malicious code would execute the next time yt-dlp runs. The vulnerability was patched in version 2026.06.09.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 8.3 HIGH · CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H
- Weaknesses (CWE)
- CWE-74
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-23 / 2026-06-26
NVD description (verbatim)
yt-dlp is a command-line audio/video downloader. Prior to 2026.06.09, if aria2c is used as an external downloader for a fragmented manifest format (such as an HLS/DASH stream), yt-dlp passes insufficiently sanitized input to aria2c that allows an attacker to perform an arbitrary file write. On Windows platforms, this can lead to immediate arbitrary code execution. On non-Windows platforms, this can lead to arbitrary code execution upon the next invocation of yt-dlp. This vulnerability is fixed in 2026.06.09.
1 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-50574 is an arbitrary file write vulnerability in yt-dlp stemming from insufficient input sanitization when passing arguments to aria2c as an external downloader. The vulnerability occurs specifically when processing fragmented manifest formats (HLS, DASH). An attacker can craft a malicious manifest or URL that, when processed by yt-dlp with aria2c enabled, results in unsanitized input being passed to aria2c, allowing file write operations outside the intended download directory. The underlying weakness is improper neutralization of special elements used in a command (CWE-74). The attack requires user interaction (clicking a link, downloading from an attacker-controlled source) and relies on the victim having configured aria2c as an external downloader, making exploitability conditional but not trivial to achieve.
Business impact
Organizations and individuals relying on yt-dlp for automated media workflows face significant risk if aria2c is configured as the external downloader. Content creators, researchers, and media operations that use yt-dlp in CI/CD pipelines or automation could inadvertently execute attacker-supplied code, leading to data exfiltration, supply chain compromise, or lateral movement. The Windows immediate-execution variant is particularly concerning for corporate environments, while non-Windows systems face deferred but still critical risk. The scope is cross-border; attackers need only host malicious content or intercept legitimate manifest URLs.
Affected systems
yt-dlp versions prior to 2026.06.09 are affected. Exposure is limited to deployments where aria2c has been explicitly configured as an external downloader. Systems using yt-dlp's default downloader or other external downloaders (wget, curl) are not vulnerable. All operating systems running vulnerable versions are at risk, though Windows sees immediate impact while Linux, macOS, and other platforms experience delayed impact until the next yt-dlp invocation.
Exploitability
Exploitation requires moderate complexity: an attacker must craft a malicious fragmented media manifest or control a source URL, and the victim must actively download from that source using yt-dlp with aria2c enabled. User interaction is mandatory (the user must initiate the download). However, once these conditions are met, the arbitrary file write is reliable, and Windows users face immediate code execution. The attack surface includes any public or semi-public video/audio source if an attacker can inject or replace manifest files. Given the specialization required (aria2c configuration), mass exploitation is unlikely, but targeted attacks against specific organizations or individuals remain practical.
Remediation
Update yt-dlp to version 2026.06.09 or later. Users unable to upgrade immediately should disable aria2c as an external downloader or avoid downloading from untrusted sources. Administrators should review deployment configurations to identify systems using aria2c with yt-dlp and prioritize patching those assets. Defense-in-depth measures include restricting yt-dlp execution in sandboxed environments and monitoring for suspicious file write operations in download directories.
Patch guidance
Verify and deploy yt-dlp version 2026.06.09 or higher across all systems running vulnerable versions. Patch priority should be highest for Windows systems and high for non-Windows systems. Verify the patch through the official yt-dlp repository. Validate that aria2c-related functionality operates normally post-patch and that existing download configurations continue to work as expected. Test with both simple and fragmented manifest formats to confirm the fix does not introduce regressions.
Detection guidance
Monitor for yt-dlp version numbers below 2026.06.09 in your environment via software inventory or endpoint detection tools. Look for process execution patterns where yt-dlp spawns aria2c with unusual or malformed arguments, particularly those containing file path separators or special characters that could indicate an exploit attempt. Log and alert on unexpected file writes to system directories or outside designated download folders from yt-dlp or aria2c processes. On Windows, monitor for unexpected code execution chains originating from yt-dlp or aria2c. Network-level detection is difficult since the vulnerability does not require external communication; focus on endpoint and process forensics.
Why prioritize this
This vulnerability merits immediate attention despite not yet being on the KEV list. The HIGH CVSS score (8.3) reflects high confidentiality, integrity, and availability impact. Windows systems face immediate arbitrary code execution risk, which is a critical concern for any organization. Even deferred execution on non-Windows systems is severe. The requirement for aria2c configuration limits the attack surface but does not eliminate it—aria2c is a common external downloader choice among power users and automation platforms. The combination of cross-boundary scope, high impact, and practical exploitability justifies urgent patching.
Risk score, explained
The CVSS 3.1 score of 8.3 (HIGH) reflects: Network attack vector (AV:N), high complexity but achievable (AC:H), no privileges required (PR:N), user interaction mandatory (UI:R), and changed scope (S:C) allowing impact beyond the immediate vulnerable component. All three impact categories (C:H, I:H, A:H) are rated high due to arbitrary file write leading to code execution. The complexity accounts for the requirement that aria2c be configured and a fragmented manifest be processed, but these do not significantly reduce real-world risk for affected users.
Frequently asked questions
Does this affect all yt-dlp users?
No. The vulnerability only affects users who have explicitly configured aria2c as an external downloader. Users with the default download configuration are unaffected. You can verify your configuration by checking your yt-dlp config file or startup parameters.
What is the difference between Windows and non-Windows impact?
On Windows, the arbitrary file write capability directly leads to code execution immediately upon download. On Linux, macOS, and other Unix-like systems, the attacker can write files, but code execution does not occur until yt-dlp is run again (for example, if a malicious executable is written to a directory in the PATH). Both outcomes are critical; the difference is timing.
How do I know if I have aria2c configured?
Check your yt-dlp configuration file (typically at ~/.config/yt-dlp/config or the equivalent on your OS) for a line containing 'external-downloader' or 'aria2c'. You can also run 'yt-dlp --list-extractors' and check for aria2c references, or test by running yt-dlp with the --external-downloader option to see what is currently set.
Is patching to 2026.06.09 sufficient, or do I need to change my aria2c configuration?
Patching to 2026.06.09 or later resolves the vulnerability and is the recommended action. You do not need to disable aria2c after patching. However, if you cannot patch immediately, disabling aria2c until a patch is available is a valid interim mitigation.
This analysis is based on the official CVE record published on 2026-06-23 and modified on 2026-06-26. All version numbers, CVSS scores, and affected products are derived from authoritative sources. This vulnerability has not yet been added to the CISA KEV catalog. Users are advised to verify patch availability and applicability to their environment through official yt-dlp releases and vendor advisories. This analysis is provided for informational purposes and does not constitute professional security advice tailored to your organization's specific risk profile or compliance requirements. Source: NVD (public-domain), retrieved 2026-07-28. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2025-27511HIGHGeoServer DB2 JNDI Injection Remote Code Execution
- CVE-2026-10110HIGHSQL Injection in code-projects Student Details Management System 1.0
- CVE-2026-10111HIGHSQL Injection in sambitraj STUDENT-MANAGEMENT-SYSTEM 1.0 Login
- CVE-2026-10178HIGHSQL Injection in code-projects Online Music Site 1.0 Admin Panel
- CVE-2026-10184HIGHSQL Injection in SourceCodester Hospitals Patient Records System 1.0
- CVE-2026-10185HIGHSQL Injection in SourceCodester Hospitals Patient Records Management System 1.0
- CVE-2026-10186HIGHSQL Injection in Online Hospital Management System 1.0 – Remote Code Execution Risk
- CVE-2026-10208HIGHSQL Injection in Online Hospital Management System Login