CVE-2026-55404: yt-dlp Command Injection via Malicious Shortcut Metadata
yt-dlp and youtube-dl are popular command-line tools for downloading audio and video from the web. When using shortcut-creation options (--write-link, --write-url-link, or --write-desktop-link), these tools can be tricked into generating malicious shortcut files if a video source contains specially crafted metadata. On Windows, an attacker can inject file:// URIs that execute commands when a user opens the shortcut; on Linux, injected newlines in desktop entry files can similarly lead to command execution. Version 2026.7.4 and later address this by properly validating and escaping metadata before writing shortcut files.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.5 HIGH · CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
- Weaknesses (CWE)
- CWE-74
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-07-08 / 2026-07-13
NVD description (verbatim)
yt-dlp and youtube-dl are command-line audio/video downloaders. Prior to 2026.7.4, the --write-link, --write-url-link, and --write-desktop-link options can write .url or .desktop shortcut files using attacker-controlled webpage_url or filename metadata without sufficient validation or escaping, allowing malicious file:// URI injection on Windows or newline-based desktop entry key injection on Linux that can execute commands if the generated shortcut is opened. This issue is fixed in version 2026.7.4.
3 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability stems from insufficient input validation and output encoding when yt-dlp and youtube-dl generate .url (Windows) or .desktop (Linux) shortcut files. The tools accept webpage_url and filename metadata from video sources without sanitizing or escaping these values before writing them into shortcut file formats. On Windows, an attacker can inject file:// protocol handlers that execute arbitrary code when the .url shortcut is opened. On Linux, newline characters can be injected into desktop entry key-value pairs, allowing injection of additional commands via the Exec or other executable fields. The attack requires user interaction (opening the generated shortcut) but is practical given how often users interact with downloaded content and auto-generated convenience files.
Business impact
For organizations or individuals using yt-dlp or youtube-dl in automated workflows, this vulnerability poses a code execution risk if downloaded video metadata is malicious. Media teams, content archivists, security researchers, and developers who download videos programmatically could inadvertently execute attacker commands on their systems. The risk is elevated in environments where shortcut files are shared or opened without scrutiny, and where the downloader runs with elevated privileges. Remediation is straightforward—updating to the patched version—but detection of past exploitation may require auditing shortcut files generated from untrusted sources.
Affected systems
yt-dlp and youtube-dl versions prior to 2026.7.4 are affected. Both Windows and Linux users are at risk, with slightly different attack vectors depending on the operating system's shortcut format. The vulnerability does not require network access from the attacker's infrastructure; malicious metadata can be embedded in any video URL or hosted on any web server. Organizations running these tools on systems where users execute downloaded shortcut files, or systems running batch download jobs, should prioritize patching.
Exploitability
Exploitation requires two conditions: (1) a user must download a video containing malicious metadata from an attacker-controlled or compromised source, and (2) the user must open the generated shortcut file. The attack is not remotely triggerable through the tool's normal operation; it depends on social engineering or compromised legitimate video sources. The CVSS 3.1 score of 7.5 (HIGH) reflects high impact (confidentiality, integrity, and availability) but acknowledges the requirement for user interaction and moderate attack complexity. No public exploit code is known to be active, and the vulnerability was not added to CISA's Known Exploited Vulnerabilities catalog as of the latest update.
Remediation
Update yt-dlp to version 2026.7.4 or later, or youtube-dl to the equivalent patched release. The patch validates and escapes metadata before writing shortcut files, preventing injection of malicious URIs or desktop entry keys. Users should also audit any shortcut files generated from downloads prior to patching, particularly those from untrusted or unusual sources. Disabling shortcut-generation options (--write-link, --write-url-link, --write-desktop-link) in high-risk environments where downloaded video sources cannot be fully trusted is a valid compensating control.
Patch guidance
Apply yt-dlp version 2026.7.4 or later as soon as feasible; this is a high-severity vulnerability with a straightforward patch and no known backward-compatibility issues. For youtube-dl, check the project's official repository for the corresponding patched version number. If you maintain automated download workflows, test the patched version in a non-production environment first to confirm compatibility with your use case. If shortcut file generation is not required for your workflow, consider disabling those options to reduce surface area.
Detection guidance
Search file systems for .url (Windows) and .desktop (Linux) files generated by yt-dlp or youtube-dl in the 90 days prior to your patching date. Look for unusual entries such as file:// URIs in .url files or suspicious Exec= lines in .desktop files. Monitor process execution following the opening of any auto-generated shortcut files from video downloads. Examine web server logs and video metadata from sources your organization downloads from to identify signs of tampering. If you log command-line invocations of yt-dlp or youtube-dl, review historical logs for use of the --write-link, --write-url-link, and --write-desktop-link flags in conjunction with unusual or external video sources.
Why prioritize this
This vulnerability merits HIGH priority due to its direct path to code execution, the wide user base of yt-dlp and youtube-dl, and the simplicity of the patch. While exploitation requires user interaction, the interaction is a normal part of the tool's intended workflow. Organizations relying on these tools for content curation, archival, or security research should patch immediately. The fact that it is not yet on CISA's KEV list should not delay patching, as that list reflects only confirmed active exploitation, not vulnerability severity.
Risk score, explained
The CVSS 3.1 score of 7.5 (HIGH) correctly weights the vulnerability: attack vector is Network (attacker can inject malicious metadata into a video URL), attack complexity is High (requires user interaction and specific tool options enabled), user interaction is Required (user must open the shortcut), and scope is Unchanged. The impact is High across all three dimensions—confidentiality (data exfiltration), integrity (code modification), and availability (system disruption or denial)—because code execution is achievable. The score balances the severity of the impact against the practical barriers to exploitation (metadata injection + user action).
Frequently asked questions
Can I be infected just by downloading a video with yt-dlp?
No. Downloading the video itself is safe. The vulnerability only activates if you use the --write-link, --write-url-link, or --write-desktop-link options to generate shortcut files, and then open one of those generated shortcut files. Simply having the video file on your system poses no risk.
Does this affect me if I use yt-dlp in a script without opening shortcut files?
Only if your scripts or downstream processes open the generated shortcut files. If you download videos and use them directly (or extract metadata) without creating or opening shortcuts, you are not affected. Disable the shortcut-writing options if they are not part of your workflow.
How do I verify whether I've been compromised?
Check for suspicious .url files (Windows) or .desktop files (Linux) in your downloads folder or wherever yt-dlp writes output. Look for unexpected file:// URIs or Exec= commands. Review recent command execution logs around the time you opened any auto-generated shortcuts. If you suspect compromise, run a full antivirus or EDR scan and review system logs for lateral movement or data exfiltration.
Is the youtube-dl project also affected, or just yt-dlp?
Both yt-dlp and the original youtube-dl project are affected. However, youtube-dl development has been slower in recent years, so verify the patch version number from the official youtube-dl repository before updating. If you use yt-dlp, which is more actively maintained, upgrading to 2026.7.4 is straightforward.
This analysis is provided for informational purposes and reflects the state of CVE-2026-55404 as of the published date. CVSS scores and severity ratings are based on vendor-supplied data and may be updated by NIST or the vendor. Patch version numbers and compatibility details should be verified against the official yt-dlp and youtube-dl project repositories before deployment. SEC.co makes no warranty regarding the completeness or accuracy of this analysis; organizations should conduct their own risk assessment and testing before applying patches or security controls in production environments. Source: NVD (public-domain), retrieved 2026-08-17. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-50574HIGHyt-dlp aria2c Arbitrary File Write and Code Execution
- CVE-2025-27511HIGHGeoServer DB2 JNDI Injection Remote Code Execution
- CVE-2026-10110HIGHSQL Injection in code-projects Student Details Management System 1.0
- CVE-2026-10111HIGHSQL Injection in sambitraj STUDENT-MANAGEMENT-SYSTEM 1.0 Login
- CVE-2026-10178HIGHSQL Injection in code-projects Online Music Site 1.0 Admin Panel
- CVE-2026-10184HIGHSQL Injection in SourceCodester Hospitals Patient Records System 1.0
- CVE-2026-10185HIGHSQL Injection in SourceCodester Hospitals Patient Records Management System 1.0
- CVE-2026-10186HIGHSQL Injection in Online Hospital Management System 1.0 – Remote Code Execution Risk