fix(deps): update dependency yt-dlp to v2026 [security] - #134
Open
renovate[bot] wants to merge 1 commit into
Open
fix(deps): update dependency yt-dlp to v2026 [security]#134renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/pypi-yt-dlp-vulnerability
branch
3 times, most recently
from
March 2, 2026 00:52
3651f68 to
0122150
Compare
renovate
Bot
force-pushed
the
renovate/pypi-yt-dlp-vulnerability
branch
2 times, most recently
from
March 9, 2026 00:45
423c7b3 to
736ea81
Compare
renovate
Bot
force-pushed
the
renovate/pypi-yt-dlp-vulnerability
branch
3 times, most recently
from
April 4, 2026 01:46
9697ed2 to
7614792
Compare
renovate
Bot
force-pushed
the
renovate/pypi-yt-dlp-vulnerability
branch
2 times, most recently
from
April 18, 2026 04:47
4d835e8 to
82dd2b4
Compare
renovate
Bot
force-pushed
the
renovate/pypi-yt-dlp-vulnerability
branch
from
April 25, 2026 05:07
82dd2b4 to
83754f4
Compare
renovate
Bot
force-pushed
the
renovate/pypi-yt-dlp-vulnerability
branch
3 times, most recently
from
May 2, 2026 04:48
27fe640 to
eb2554a
Compare
renovate
Bot
force-pushed
the
renovate/pypi-yt-dlp-vulnerability
branch
from
May 16, 2026 05:16
eb2554a to
999b2f7
Compare
renovate
Bot
force-pushed
the
renovate/pypi-yt-dlp-vulnerability
branch
2 times, most recently
from
May 25, 2026 00:55
46716ad to
469704f
Compare
renovate
Bot
force-pushed
the
renovate/pypi-yt-dlp-vulnerability
branch
2 times, most recently
from
May 31, 2026 16:46
565b0d6 to
9c8974d
Compare
renovate
Bot
force-pushed
the
renovate/pypi-yt-dlp-vulnerability
branch
2 times, most recently
from
June 24, 2026 01:06
e3a7b7c to
37d9371
Compare
renovate
Bot
force-pushed
the
renovate/pypi-yt-dlp-vulnerability
branch
from
June 27, 2026 04:34
37d9371 to
fa0ad8b
Compare
renovate
Bot
force-pushed
the
renovate/pypi-yt-dlp-vulnerability
branch
from
July 28, 2026 13:10
fa0ad8b to
d0b7e55
Compare
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:
2024.12.23→2026.7.4yt-dlp: Arbitrary Command Injection when using the
--netrc-cmdoptionCVE-2026-26331 / GHSA-g3gw-q23r-pgqm
More information
Details
Summary
When yt-dlp's
--netrc-cmdcommand-line option (ornetrc_cmdPython API parameter) is used, an attacker could achieve arbitrary command injection on the user's system with a maliciously crafted URL.Impact
yt-dlp maintainers assume the impact of this vulnerability to be high for anyone who uses
--netrc-cmdin their command/configuration ornetrc_cmdin their Python scripts. Even though the maliciously crafted URL itself will look very suspicious to many users, it would be trivial for a maliciously crafted webpage with an inconspicuous URL to covertly exploit this vulnerability via HTTP redirect. Users without--netrc-cmdin their arguments ornetrc_cmdin their scripts are unaffected. No evidence has been found of this exploit being used in the wild.Patches
yt-dlp version 2026.02.21 fixes this issue by validating all netrc "machine" values and raising an error upon unexpected input.
Workarounds
It is recommended to upgrade yt-dlp to version 2026.02.21 as soon as possible.
Users who are unable to upgrade should avoid using the
--netrc-cmdcommand-line option (ornetrc_cmdPython API parameter), or they should at least not pass a placeholder ({}) in their--netrc-cmdargument.Details
yt-dlp's
--netrc-cmdoption can be used to run any arbitrary shell command to retrieve site login credentials so that the user doesn't have to store the credentials as plaintext in the filesystem. The--netrc-cmdargument is a shell command with an optional placeholder ({}). If the placeholder is present in the argument, it is replaced with the netrc "machine" value, which specifies the site for which login credentials are needed.The netrc "machine" value is usually explicitly defined in yt-dlp's extractor code for a given site. However, yt-dlp has four extractors where the netrc "machine" value needs to be dynamically sourced from the site's hostname. And in three of those extractors (
GetCourseRuIE,TeachableIEandTeachableCourseIE), wildcard matches are allowed for one or more subdomains of the hostname. This can result in a netrc "machine" value that contains special shell characters.The
--netrc-cmdargument is executed by a modified version of Python'ssubprocess.Popenwithshell=True, which means that any special characters may be interpreted by the host shell, potentially leading to arbitrary command injection.Here is an example of maliciously crafted URL input that exploits the vulnerability:
Although only 3 of yt-dlp's extractors are directly susceptible to this attack, yt-dlp's "generic" extractor will follow HTTP redirects and try to match the resulting URL with one of the dedicated extractors. This means that any URL processed by the generic extractor could ultimately lead to a maliciously crafted URL that is matched by one of the vulnerable extractors. Hypothetically, an attacker could create a website with an inconspicuous URL and legitimate-looking media content that would serve an HTTP redirect to a maliciously crafted URL when it detects a request from yt-dlp.
References
Severity
CVSS:3.1/AV:N/AC:L/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: 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
v2026.2.21Compare Source
v2026.2.4Compare Source
v2026.1.31Compare Source
v2026.1.29Compare Source
v2025.12.8Compare Source
v2025.11.12Compare Source
Important changes
yt-dlp now requires users to have an external JavaScript runtime (e.g. Deno) installed in order to solve the JavaScript challenges presented by YouTube. Read more
Core changes
--cookies-from-browserfor Safari on iOS (#14950) by pha1n0qhookcategory (#14845) by seproDevExtractor changes
tv_downgradedclient (#14887) by seproDev (With fixes in fa35eb2)web_embeddedclient extraction (#14843) by bashonly, seproDevDownloader changes
ffmpeg_argsfor each format (#14886) by bashonlyNetworking changes
Misc. changes
install_depsscript (#14766) by bashonlyv2025.10.22Compare Source
Important changes
Some formats may still be unavailable, especially if cookies are passed to yt-dlp. The NEXT release, expected very soon, will require an external JS runtime (e.g. Deno) in order for YouTube downloads to work properly. Read more
Python 3.9 has reached its end-of-life as of October 2025, and yt-dlp has now removed support for it. Read more
Core changes
Extractor changes
Misc. changes
v2025.10.14Compare Source
Core changes
prefer-vp9-sortcompat option (#14603) by seproDevExtractor changes
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.