Safeguard
Vulnerability Analysis•

CVE-2026-50023: High Severity File Write in yt-dlp

CVE-2026-50023 is a high severity flaw in yt-dlp before 2026.06.09: unsafe shortcut files can be written. Upgrade to 2026.06.09 or later and update wrappers.

Safeguard Security Team
3 min read

CVE-2026-50023 is a high severity (CVSS 8.3) flaw in yt-dlp before 2026.06.09. A malicious media source can make the tool write OS shortcut files such as .desktop, .url and .webloc, bypassing the earlier fix for CVE-2024-38519. Upgrade to 2026.06.09 or later.

What's affected

  • Product: yt-dlp, the command line audio and video downloader, installed from PyPI as yt-dlp.
  • Affected: versions before 2026.06.09.
  • Fixed: 2026.06.09, per the GitHub advisory.
  • Weakness: CWE-641, improper restriction of names for files and other resources.
  • CVSS 8.3 (high), vector CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H. The vector shows high attack complexity and user interaction.
  • Published 23 June 2026. Not marked as exploited in CISA KEV.

The advisory explains the background. The earlier fix for CVE-2024-38519 added an allowlist of file extensions, and that allowlist deliberately kept .desktop, .url and .webloc so the link-writing option would still work. Those entries are what this CVE is about.

How to check if you're exposed

Check the version you run.

yt-dlp --version
pip show yt-dlp | grep -i '^version'

The version string is date based. Anything earlier than 2026.06.09 is affected. If you installed through a package manager, a standalone binary, or a Docker image, check each of those separately, since they update on their own schedule.

Also look at any scripts, cron jobs, bots or media servers that call yt-dlp, and the machine they run on. Pinned old versions in requirements files and container images are the usual place for this to hide.

What to do now

  1. Update to 2026.06.09 or later with the method you used to install it, for example pip install -U yt-dlp or yt-dlp -U for the standalone binary.
  2. Update container images and pinned requirements that include yt-dlp, and rebuild.
  3. Do not open .desktop, .url or .webloc files that appear next to downloaded media, especially if you downloaded subtitles.
  4. If you run yt-dlp on a server for other people, run it as a low privilege user and keep its output directory separate from anything that opens files automatically.
  5. Review the download folder for shortcut files you did not expect, and delete the ones you cannot explain.

Why it matters

Shortcut files are risky because they are more than data. They can point to a web address, run a command, or open a remote program, and the extension is often hidden by the file manager, so a file named like a subtitle file may actually be a shortcut. The advisory describes this as a social engineering route: place a convincing file next to a download and wait for someone to open it.

The class is CWE-641. The lesson for tool authors is that an allowlist is only as safe as its entries. Each allowed extension should be justified on its own.

Safeguard has a free in-browser dependency scan at gold.safeguard.sh/scan that matches the packages in a manifest against known CVEs.

Quick check

Does this run code by itself?

No. The advisory describes writing a shortcut file that a person might open. That is why the vector marks user interaction as required.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.