Skip to main content

yt-dlp CVE-2026-50574

| EUVDEUVD-2026-38495 CRITICAL
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (CWE-74)
2026-06-16 https://github.com/yt-dlp/yt-dlp GHSA-vx4q-3cr2-7cg2
9.6
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Lure victim to malicious manifest URL
  2. Delivery
    Serve DASH manifest with '
' in fragment URL
  3. Exploit
    yt-dlp unescapes newline, injects aria2c 'out=' option
  4. Execution
    aria2c writes attacker file (ffmpeg.exe or yt-dlp.conf)
  5. Persist
    Planted binary/config executes
  6. Impact
    Arbitrary code execution on host

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Input neutralization, injection prevention
Exploitation Conditions

Exploitation requires that the victim has selected aria2c as the external downloader (e.g. '--downloader aria2c') AND is downloading a fragmented manifest format (HLS/m3u8 or DASH/mpd) from an attacker-controlled or attacker-influenced source. Vector 1 (option injection via '
' in fragment URLs) works only against DASH because its XML manifests unescape HTML entities; vector 2 (newlines in the 'title'/output-template metadata) works on both HLS and DASH but additionally requires the victim to have passed '--no-windows-filename', which disables newline sanitization in filenames. Limiting factors: this is not a default configuration (aria2c is not the default downloader), it requires user interaction to initiate the download (UI:R), and immediate single-run code execution is Windows-specific (planted ffmpeg.exe); on other platforms code execution is deferred to the next yt-dlp run via a planted yt-dlp.conf.

Impact

Signals conflict and should be weighed carefully. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H, 9.6) reflects network reach and total impact, and SSVC rates Technical Impact as total - but SSVC also rates Exploitation as 'none' and Automatable as 'no', and EPSS is only 0.40% (32th percentile), indicating no observed exploitation and low predicted near-term exploitation. This is not in CISA KEV and no public exploit is identified. The realistic risk is gated by several non-default preconditions: the victim must explicitly choose aria2c as the external downloader for fragmented formats, the attacker must control the manifest/metadata source, and vector 2 additionally requires the victim to run --no-windows-filename. So while the theoretical impact is critical (RCE), real-world priority is moderate-to-high mainly for users who run aria2c with attacker-influenced URLs; the very high CVSS overstates breadth relative to EPSS/SSVC. The 'Microsoft'/Windows tag is apt because Windows is the only platform with immediate (single-run) code execution.

Exploit ScenarioDerived

An attacker hosts a malicious DASH manifest and lures a victim who runs yt-dlp with aria2c as the external downloader; the manifest contains a fragment URL with '
' that yt-dlp unescapes into a newline, injecting aria2c options that write attacker-controlled files. On Windows the attacker plants ffmpeg.exe in the working directory for immediate execution during post-processing; on Linux/macOS they plant a yt-dlp.conf with a malicious --exec that runs on the victim's next invocation. No public PoC is identified at time of analysis, and exploitation requires the victim to act (UI:R) and to have aria2c configured.

Act Now Prioritize within 24-48h. Why: CRITICAL severity + public POC available.
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv3 – Jun 26, 2026

Arbitrary code execution in yt-dlp versions before 2026.06.09 occurs when aria2c is selected as the external downloader for fragmented HLS/DASH streams, allowing a malicious manifest or metadata server to inject options into aria2c's input file and write attacker-controlled files. On Windows this yields immediate code execution via a planted ffmpeg.exe, while on all platforms it enables code execution on the next run via a planted yt-dlp.conf with a malicious --exec. CVSS is 9.6 (critical), but there is no public exploit identified at time of analysis, EPSS is low (0.40%, 32th percentile), and CISA SSVC marks exploitation as none.

Earlier versions of this analysis (2)
v2 Jun 26, 2026 - 20:29 cvss changed CVSS 9.6

Arbitrary code execution in yt-dlp (all versions before 2026.06.09) is possible when a victim uses aria2c as the external downloader for fragmented HLS/DASH streams. yt-dlp builds aria2c's -i input file from insufficiently sanitized fragment URLs and output-template metadata, letting an attacker who controls a manifest or media metadata inject aria2c options (CWE-74) and write arbitrary files - yielding immediate code execution on Windows (via a planted ffmpeg.exe) or deferred code execution on any platform (via a planted yt-dlp.conf). No public exploit identified at time of analysis and it is not in CISA KEV, but the CVSS is 9.6 and the GitHub Security Advisory (GHSA-vx4q-3cr2-7cg2) documents two fully described attack vectors, so working exploitation is plausible.

v1 Jun 16, 2026 - 23:21 CVSS 8.3

Arbitrary code execution in yt-dlp versions prior to 2026.06.09 allows remote attackers to compromise systems via maliciously crafted HLS or DASH manifests when aria2c is configured as the external downloader. The flaw stems from insufficient sanitization of fragment URLs and metadata fields passed into the aria2c input file, enabling option injection that yields arbitrary file writes - immediate RCE on Windows and delayed RCE via dropped yt-dlp.conf on other platforms. No public exploit identified at time of analysis, but a detailed GHSA advisory (GHSA-vx4q-3cr2-7cg2) and patch commit are publicly available.

RemediationAI

Vendor-released patch: upgrade to yt-dlp 2026.06.09 (or later), which removes aria2c support for fragmented HLS/DASH downloads (commit https://github.com/yt-dlp/yt-dlp/commit/25056f0d2d47adbd235a8d422fa62d68d0be2bc2; release https://github.com/yt-dlp/yt-dlp/releases/tag/2026.06.09). For users who cannot upgrade immediately, the vendor-recommended workaround is to force the native downloaders for fragmented formats by adding '--downloader dash,m3u8:native' to the yt-dlp command, which avoids handing fragment lists to aria2c at the cost of losing aria2c's parallelized fragment downloading speed. As additional hardening, avoid running yt-dlp (or yt-dlp.exe) from the same directory you download into so a planted ffmpeg.exe or yt-dlp.conf is not picked up, and do not use --no-windows-filename with untrusted sources. See GHSA-vx4q-3cr2-7cg2 for full details.

Affected VersionsENISA

yt-dlp < 2026.06.09

Affected Packages

pypi yt-dlp fix: 2026.06.09, 2026.6.9

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw is a CWE-74 injection (improper neutralization of special elements) in how yt-dlp builds the aria2c '-i'/'--input-file' file. aria2c's input-file format treats indented lines following a URI as per-URI command-line options (e.g. 'out=' for the output filename), so any newline an attacker can smuggle into a fragment URL or filename becomes a new aria2c directive. Two vectors exist: (1) a DASH manifest is XML, so a fragment URL containing the HTML entity '&#10;' is unescaped to a real newline, letting an attacker inject arbitrary aria2c options; (2) crafted metadata (e.g. the 'title' field used in the output template) carrying newlines and magnet URIs, reachable on both HLS and DASH, but only when the user has set --no-windows-filename to disable newline sanitization. The affected package is pkg:pip/yt-dlp; the upstream fix (commit 25056f0d) removes aria2c support for fragmented manifests entirely and trims its SUPPORTED_PROTOCOLS back to http/https/ftp/ftps.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 9.6 CRITICAL
AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
vuln.today AI 9.6 CRITICAL

Attacker-controlled remote manifest is delivered network-wide with no auth (AV:N/PR:N) but needs the victim to run a download with aria2c (UI:R); file write escapes yt-dlp's intended scope into host code execution (S:C, C/I/A:H).

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

5
Analysis Updated
Jun 26, 2026 - 20:30 vuln.today
v3 - CVSS changed
Analysis Updated
Jun 26, 2026 - 20:29 vuln.today
v2 - CVSS changed
Severity Changed
Jun 26, 2026 - 20:22 NVD
HIGH CRITICAL
CVSS changed
Jun 26, 2026 - 20:22 NVD
8.3 (HIGH) 9.6 (CRITICAL)
CVE Published
Jun 16, 2026 - 21:13 github-advisory
HIGH 8.3

DescriptionNVD

Summary

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.

Details

When downloading a fragmented manifest format such as an HLS or DASH stream, yt-dlp first extracts a list of all fragment URLs from the stream's manifest. If the user has selected aria2c as an external downloader, yt-dlp then constructs an input file for aria2c from the fragment URL list and passes its filepath as the argument to aria2c's -i option.

aria2c's -i (or --input-file) option allows for downloading a list of URIs from the given text file. The text file must be formatted as a list of URIs separated by newlines. aria2c's format permits configuration lines for each URI, which can contain command-line options to be given to aria2c. These optional lines follow each URI line and are signified only by leading whitespace. yt-dlp constructs the input file with these optional lines so that it's able to specify the output filename for each fragment using the out= option.

yt-dlp's utilization of the aria2c input file format presents two known attack vectors:

  1. An attacker can craft a malicious DASH manifest with one or more fragment URLs that contain &#10;, which is the HTML escape sequence for a newline. yt-dlp interprets this escape sequence as an actual newline character when writing the fragment URLs to the aria2c input file, which allows for an attacker to inject arbitrary aria2c options into the input file. With option injection, the attacker can achieve arbitrary file writes. This attack vector is possible only via downloads of DASH formats, since their manifests are an XML format which necessitates unescaping of HTML special characters.
  2. An attacker can craft a malicious metadata response where the data parsed by yt-dlp as the title field (or any other metadata field that the user includes in their output template) contains strategically placed newlines and magnet URIs. If the user has passed the --no-windows-filename option to disable sanitization of newlines in output filenames, the attacker is able to achieve arbitrary file writes by injecting arbitrary URIs and options into the aria2c input file. This attack vector is possible via downloads of both HLS and DASH formats.

On Windows, attacker-controlled file writes can lead to immediate arbitrary code execution: the attacker could write a malicious executable file named ffmpeg.exe to the current working directory, and it could be invoked during the postprocessing stage if the user's yt-dlp.exe also resides in the current working directory.

On all platforms, attacker-controlled file writes can lead to arbitrary code execution on repeat invocations of yt-dlp: the attacker could write a yt-dlp configuration file (yt-dlp.conf) to the current working directory containing a malicious --exec argument.

Patches

yt-dlp version 2026.06.09 fixes this issue by removing support for downloading fragmented manifest formats with aria2c.

Workarounds

It is recommended to upgrade yt-dlp to version 2026.06.09 as soon as possible.

For users who are not able to upgrade:

  • Add --downloader dash,m3u8:native to your yt-dlp command.

Executive ViewAI

Why It Matters

yt-dlp, a widely-used open-source media downloader, contains a critical arbitrary code execution vulnerability (CVE-2026-50574, CVSS 9.6) affecting versions before 2026.06.09 when aria2c is configured as the external downloader. Although no public exploit has been identified at time of analysis, an attacker controlling a malicious media source or metadata server can inject code that executes immediately on Windows or on the next application run across all platforms. Organizations using yt-dlp in automated media processing pipelines, content workflows, or research environments require immediate patching to prevent potential system compromise and data theft.

Business Impact: Severe
Compensating Controls

Apply vendor patch: upgrade yt-dlp to version 2026.06.09 or later. Interim mitigation (if patch deployment is delayed): disable aria2c as the configured external downloader and restrict yt-dlp execution to trusted, internally-controlled media sources only.

Threat Intelligence Overview

EPSS Score
0.4%
Top 68% exploitable
Prevalence
High
extremely popular media-downloader CLI used widely across platforms
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC Yes
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity + public POC available
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
Very High
Technical Impact
Total

Priority Score

68
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +48
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Vendor StatusVendor

SUSE

Product Status
openSUSE Tumbleweed Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy