CVE-2026-50023 yt-dlp: Dangerous file type creation via insufficient filename sanitization (Bypass of CVE-2024-38519)
Remote attackers can write malicious OS shortcut files to the user's filesystem, potentially leading to code execution or privilege escalation.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-50023?
CVE-2026-50023 is a high-severity vulnerability in yt-dlp, published on 23 Jun 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
yt-dlp is a command-line audio/video downloader. Prior to 2026.06.09, 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. The 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. This vulnerability is fixed in 2026.06.09.
Weakness: CWE-641
Which versions are affected by CVE-2026-50023?
3 open source packages ship an affected version, including yt-dlp. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
yt-dlp PyPI | All versions | 2026.6.9 |
yt-dlp PyPI | All versions | 2026.6.9 |
yt-dlp PyPI | All versions | 2026.6.9 |
Products include Yt-Dlp Project Yt-Dlp.
How do I fix CVE-2026-50023?
Upgrade yt-dlp to 2026.6.9 or later.
Is CVE-2026-50023 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-50023 exists.
Other vulnerabilities in yt-dlp
- CVE-2026-26331 yt-dlp: Arbitrary Command Injection when using the `--netrc-cmd` option
- CVE-2024-22423 yt-dlp `--exec` command injection when using `%q` in yt-dlp on Windows
- CVE-2023-40581 yt-dlp command injection when using `%q` in `--exec` on Windows
- CVE-2026-50574 yt-dlp: Arbitrary code execution via manifest downloads with aria2c
- CVE-2026-55404 yt-dlp: Downstream command injection via improper sanitization of yt-dlp --write-link output
Sources
Also known as DEBIAN-CVE-2026-50023, GHSA-c6mh-fpjc-4pr3, PYSEC-2026-3430, UBUNTU-CVE-2026-50023.