Repository navigation
chore(deps): update dependency yt-dlp to v2026.7.4 [security] - #117
Closed
renovate[bot] wants to merge 2 commits into
Closed
renovate[bot] wants to merge 2 commits into
renovate[bot] wants to merge 2 commits into
Conversation
Auto-generated by GitHub Actions from uv export
Contributor
|
✅ Backend requirements.txt updated Generated from |
Contributor
Author
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==2026.2.21→==2026.7.4yt-dlp: File Downloader cookie leak with curl
CVE-2026-50019 / GHSA-f7j3-774f-rfhj
More information
Details
Summary
If curl is used an external downloader for yt-dlp, cookies may be leaked to an unintended host upon HTTP redirect or when the host for download fragments differs from their parent manifest's.
This is the equivalent to GHSA-v8mc-9377-rwjj for the
curldownloader. The vulnerable behavior is present in yt-dlp released since 2023.09.24.Details
At the file download stage, the cookies are passed by yt-dlp to the file downloader via
--cookie. However, unless these are loaded from a file, this operation does not activate the cookie engine. As a result,curlwill send cookies with requests to domains or paths for which the cookies are not scoped.An example of a potential attack scenario exploiting this vulnerability:
curl.curlforwards the user's sensitive cookie information.Patches
yt-dlp version 2026.06.09 fixes this issue by doing the following:
--cookie -ifcurlis version 7.59 or higher.--cookie /dev/fd/0if the system supports this device file.--cookie <file>.Workarounds
It is recommended to upgrade yt-dlp to version 2026.06.09 as soon as possible.
For users who are not able to upgrade:
--downloader curl.Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
yt-dlp: Dangerous file type creation via insufficient filename sanitization (Bypass of CVE-2024-38519)
CVE-2026-50023 / GHSA-c6mh-fpjc-4pr3
More information
Details
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 forCVE-2024-38519.Details
The fix for
CVE-2024-38519enforced an allowlist for file extensions, in order to prevent writing files with unsafe extensions (such as.exeor.sh) during file downloads. However, this allowlist explicitly included the unsafe extensions.desktop,.url, and.weblocso that the functionality of the--write-linkoption (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=SUBTITLEStag 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.desktopextension if the user had passed the--write-subsoption.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.m3u8manifest that points to malicious subtitle payloads:And host the
payload.desktopfile with malicious content:2. Trigger the download:
In this case, the generic extractor triggers the exploit if the
--write-subsoption is used:Result: yt-dlp writes
MyVideo.en.desktopto disk, containing the attacker payload.Patches
yt-dlp version 2026.06.09 fixes this issue by removing
.url,.desktopand.weblocfrom the global file extension allowlist, and by only allowing those file types to be written from within the context of the--write-linkoptions' 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:
--write-subs,--write-auto-subs,--embed-subs,--write-thumbnail,--write-all-thumbnails, or--embed-thumbnailoptions--format -to interactively select download formats and validate their file extensionsSeverity
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
yt-dlp: Arbitrary code execution via manifest downloads with aria2c
CVE-2026-50574 / GHSA-vx4q-3cr2-7cg2
More information
Details
Summary
If aria2c is used as an external downloader for a fragmented manifest format (such as an HLS/DASH stream), yt-dlp passes insufficiently sanitized input to aria2c that allows an attacker to perform an arbitrary file write. On Windows platforms, this can lead to immediate arbitrary code execution. On non-Windows platforms, this can lead to arbitrary code execution upon the next invocation of yt-dlp.
Details
When downloading a fragmented manifest format such as an HLS or DASH stream, yt-dlp first extracts a list of all fragment URLs from the stream's manifest. If the user has selected aria2c as an external downloader, yt-dlp then constructs an input file for aria2c from the fragment URL list and passes its filepath as the argument to aria2c's
-ioption.aria2c's
-i(or--input-file) option allows for downloading a list of URIs from the given text file. The text file must be formatted as a list of URIs separated by newlines. aria2c's format permits configuration lines for each URI, which can contain command-line options to be given to aria2c. These optional lines follow each URI line and are signified only by leading whitespace. yt-dlp constructs the input file with these optional lines so that it's able to specify the output filename for each fragment using theout=option.yt-dlp's utilization of the aria2c input file format presents two known attack vectors:
An attacker can craft a malicious DASH manifest with one or more fragment URLs that contain
&#​10;, which is the HTML escape sequence for a newline. yt-dlp interprets this escape sequence as an actual newline character when writing the fragment URLs to the aria2c input file, which allows for an attacker to inject arbitrary aria2c options into the input file. With option injection, the attacker can achieve arbitrary file writes. This attack vector is possible only via downloads of DASH formats, since their manifests are an XML format which necessitates unescaping of HTML special characters.An attacker can craft a malicious metadata response where the data parsed by yt-dlp as the
titlefield (or any other metadata field that the user includes in their output template) contains strategically placed newlines and magnet URIs. If the user has passed the--no-windows-filenameoption to disable sanitization of newlines in output filenames, the attacker is able to achieve arbitrary file writes by injecting arbitrary URIs and options into the aria2c input file. This attack vector is possible via downloads of both HLS and DASH formats.On Windows, attacker-controlled file writes can lead to immediate arbitrary code execution: the attacker could write a malicious executable file named
ffmpeg.exeto the current working directory, and it could be invoked during the postprocessing stage if the user'syt-dlp.exealso resides in the current working directory.On all platforms, attacker-controlled file writes can lead to arbitrary code execution on repeat invocations of yt-dlp: the attacker could write a yt-dlp configuration file (
yt-dlp.conf) to the current working directory containing a malicious--execargument.Patches
yt-dlp version 2026.06.09 fixes this issue by removing support for downloading fragmented manifest formats with aria2c.
Workarounds
It is recommended to upgrade yt-dlp to version 2026.06.09 as soon as possible.
For users who are not able to upgrade:
--downloader dash,m3u8:nativeto your yt-dlp command.Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
yt-dlp: Arbitrary command injection possible if --exec option used with yt-dlp
GHSA-69qj-pvh9-c5wg
More information
Details
Summary
yt-dlp's
--execoption is vulnerable to arbitrary command injection when handling untrusted metadata if the argument uses standard string formatting (e.g.%(title)s) or other unsafe conversions. An attacker could achieve remote code execution on the user's machine via maliciously crafted metadata containing quotes or other special shell characters.Details
Since yt-dlp version 2021.04.11, the
--execoption has supported "output template syntax", which is a superset of Python'sprintf-style string formatting also used by the--outputoption. This means the user is able to pass a "command template" as an argument to the--execoption which will be executed by the user's shell. The command template allows for the downloaded video's metadata to be interpolated into the command string.yt-dlp implements a
%()qconversion, which will shell-quote/escape any metadata value such that it is safe to be interpolated into a command string. However, there are unsafe conversions such as%()swhich result in the command template being formatted with the raw metadata string. These unsafe conversions do not perform any sanitization or escaping for shell contexts. If one or more of these unsafe conversions is used in the command template, an attacker can craft a malicious metadata value containing shell operators (e.g.;,&,|) to break out of the intended command and execute payload commands.Impact
The impact is limited to users who pass an
--execcommand template containing unsafe conversions in their yt-dlp command or configuration file:%()s,%()a,%()r,%()j,%()S(including any of their flagged variants.)Patches
yt-dlp version 2026.06.09 fixes this issue by restricting the conversions that can be used in an
--execcommand template to those known to be safe:%()d,%()i,%()f,%()q(including any of their flagged variants.) It also restricts the characters that can be used in command template defaults and placeholders when the user passes an--execargument containing output template syntax.Workarounds
This vulnerability can be fully mitigated by doing any of the following:
%()d,%()i,%()f,%()q) in any--execcommand templates--execarguments--execoptionProof-of-Concept
video; touch pwned.txt #--execflag.Reproduction steps (simulated):
python3 poc.pyPWNED.txtwill be created, proving arbitrary command execution.Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
yt-dlp: Downstream command injection via improper sanitization of yt-dlp --write-link output
CVE-2026-55404 / GHSA-6v4j-43gg-vj32
More information
Details
Summary
If the
--write-link,--write-url-linkor--write-desktop-linkoptions are used with yt-dlp, it may produce output that can lead to downstream remote code execution. An attacker can craft a malicious metadata payload to achieve arbitrary command injection in the.urland.desktopshortcut files written by yt-dlp. This allows for malicious shell commands or malicious remote executables to run on the user's system if the user executes the generated.urlor.desktopfiles.Details
The expected result of yt-dlp's
--write-link,--write-url-linkand--write-desktop-linkoptions is to write a shortcut file that points to the webpage URL for the content downloaded by yt-dlp. The--write-url-linkoption writes a.urlshortcut file for Windows, the--write-desktop-linkoption writes a.desktopshortcut file for Linux, and the--write-linkoption may write a.urlfile or a.desktopfile depending on the user's platform.There are two known scenarios where a remote attacker could serve a malicious metadata payload to exploit yt-dlp's improper validation/sanitization of its shortcut output and achieve arbitrary code execution if the user later opens these files.
Scenario 1:
file://URI injection in Windows.urlshortcutIf a yt-dlp user passes the
--write-linkor--write-url-linkoption to generate a Windows.urlfile, the URL written to the shortcut file is sourced from the downloaded media's metadata--specifically, itswebpage_urlvalue. This value is commonly a normalized version of the input URL passed to yt-dlp by the user, but in some cases it may be extracted from untrusted web input. Validation of thiswebpage_urlvalue is performed if it is fed back to yt-dlp as an input URL (e.g. via the--load-info-jsonoption), but no validation is performed before it is output to a.urlshortcut file.This lack of validation is exploitable by a remote attacker who crafts a malicious metadata payload such that the resulting
webpage_urlvalue is afile://URI. A malicious file URI could point to a remote executable, e.g.file://example.org/pwned.exe. If a Windows user double-clicks a.urlfile that points to thiswebpage_url, Windows will execute the malicious remote executable on the user's system.Scenario 2: Shell command injection in Linux
.desktopshortcutThe Linux
.desktopfile format is a more versatile than the Windows.urlfile format. It is defined by the freedesktop.org "desktop entry" file specification, and supports multiple types of shortcuts: aLinktype for URLs, aDirectorytype for filesystem folders, and anApplicationtype for programs or shell commands. yt-dlp outputs a desktop entry file of theLinktype, using the template below:The keys under the
[Desktop Entry]group are separated by newlines, and the type of desktop entry is set by the value paired to theTypekey.If a yt-dlp user passes the
--write-linkor--write-desktop-linkoption to generate a desktop entry file, in addition to thewebpage_urlvalue there is afilenamevalue that is written to the shortcut file. By default, yt-dlp will sanitize thefilenamevalue: this sanitization includes replacing newlines with spaces and removing other control characters. However, the--no-windows-filenamesoption was modified in yt-dlp version 2024.12.23 to disable this default filename sanitization when used.If the user passes
--write-linkor--write-desktop-linktogether with--no-windows-filenamesto yt-dlp, an unsanitizedfilenamevalue can be written to the resulting desktop entry file. A remote attacker can exploit this lack of sanitization by crafting a malicious metadata payload such that the resultingfilenamevalue contains newline characters, which can be used to inject arbitrary groups, keys and values into the desktop entry output. Doing so allows the attacker to change theTypeof the desktop entry toApplicationand achieve shell command injection.For example, an attacker-controlled website could serve a webpage with this maliciously crafted JSON-LD data:
Then, a yt-dlp user could try to download the legitimate video content from the page by running the following command:
yt-dlp --write-desktop-link --no-windows-filenames "https://example.org/123"Which would result in a desktop entry file containing a malicious shell command:
If a user on a Linux desktop environment executes the generated
.desktopfile, the malicious shell command would run on the user's system. (In the above example, a/tmp/pwnedfile would be created in the user's filesystem.)Patches
yt-dlp version 2026.07.04 fixes this issue by validating the URL scheme before any shortcut file is written, and by properly sanitizing all desktop entry values written to the
.desktopfile generated from using the--write-desktop-linkor--write-linkoptions. (Most notably: newline characters are replaced by their proper escape sequence per the freedesktop.org desktop entry specification.)Workarounds
It is recommended to upgrade yt-dlp to version 2026.07.04 as soon as possible.
Users who are not able to upgrade should avoid using any of the
--write-link,--write-url-linkor--write-desktop-linkoptions.Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
yt-dlp/yt-dlp (yt-dlp)
v2026.7.4Compare Source
v2026.6.9Compare Source
v2026.3.17Compare Source
v2026.3.13Compare Source
v2026.3.3Compare Source
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.