Update dependency yt-dlp to v2026 [SECURITY]#91
Open
renovate[bot] wants to merge 1 commit intomasterfrom
Open
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #91 +/- ##
==========================================
+ Coverage 85.71% 88.39% +2.67%
==========================================
Files 5 5
Lines 112 112
==========================================
+ Hits 96 99 +3
+ Misses 16 13 -3 ☔ View full report in Codecov by Sentry. |
1e7df99 to
83a4b48
Compare
83a4b48 to
482b906
Compare
Contributor
Author
|
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.0.0→^2026.0.0GitHub Vulnerability Alerts
CVE-2024-38519
Summary
yt-dlpdoes not limit the extensions of downloaded files, which could lead to arbitrary filenames being created in the download folder (and path traversal on Windows). Sinceyt-dlpalso reads config from the working directory (and on Windows executables will be executed from the yt-dlp directory) this could lead to arbitrary code being executed.Patches
yt-dlpversion 2024.07.01 fixes this issue by whitelisting the allowed extensions.This means some very uncommon extensions might not get downloaded; however, it will also limit the possible exploitation surface.
Workarounds
It is recommended to upgrade yt-dlp to version 2024.07.01 as soon as possible, always have
.%(ext)sat the end of the output template, and make sure you trust the websites that you are downloading from. Also, make sure to never download to a directory within PATH or other sensitive locations like your user directory,system32, or other binaries locations.For users not able to upgrade:
--ies default,-generic)-o "%(title)s [%(id)s].%(ext)s)--write-subs,--write-auto-subs,--all-subs,--write-srt)--ignore-config --config-location ...to not load config from common locationsDetails
One potential exploitation might look like this:
From a mimetype we do not know, we default to trimming the leading bit and using the remainder. Given a webpage that contains
this will try and download a file called
ffmpeg.exe(-o "%(title)s.%(ext)s).ffmpeg.exewill be searched for in the current directory, and so upon the next run arbitrary code can be executed.Alternatively, when engineering a file called
yt-dlp.confto be created, the config file could contain--exec ...and so would also execute arbitrary code.Acknowledgement
A big thanks to @JarLob for independently finding a new application of the same underlying issue.
More can be read about on the dedicated GitHub Security Lab disclosure here: Path traversal saving subtitles (GHSL-2024-090)
References
GHSA-3v33-3wmw-3785
Impact
yt-dlp's DouyuTV and DouyuShow extractors used a
cdn.bootcdn.netURL as a fallback for fetching a component of the crypto-js JavaScript library. When the Douyu extractor is used, yt-dlp extracts this JavaScript code and attempts to execute it externally using PhantomJS.bootcdn.netis owned by the bad actor responsible for the Polyfill JS supply chain attack that has been ongoing since at least June 2023. While there is no evidence that PhantomJS has been targeted by or is vulnerable to any attacks carried out by the Polyfill JS actor, there is the possibility that malicious JavaScript code may have been downloaded/cached by yt-dlp or executed by PhantomJS.In order for this potential vulnerability to be exploited by any hypothetical attack, all 3 of the following conditions must be met:
douyu.comordouyutv.comURL to yt-dlp as input, or passes a URL that redirects to one of these domains.cdnjs.cloudflare.comis unavailable or blocked at the time of extraction, necessitating the usage of thecdn.bootcdn.netfallback; or it had been unavailable during a previous run of the Douyu extractor and JavaScript code fromcdn.bootcdn.nethad been cached to disk.Patches
yt-dlp version 2024.07.07 fixes this issue by removing the URL pointing to the malicious CDN and by invalidating any Douyu extractor cache data created by unpatched versions of yt-dlp.
Workarounds
It is recommended to upgrade yt-dlp to version 2024.07.07 as soon as possible.
For users not able to upgrade:
--ies default,-douyutv,-douyushow)Acknowledgement
Thanks to @LeSuisse for reporting this promptly after
bootcdn.netwas discovered to be under control of the same bad actor behind thepolyfill.iosupply chain attack.References
CVE-2026-26331
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
Release Notes
yt-dlp/yt-dlp (yt-dlp)
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
v2025.9.26Compare Source
v2025.9.23Compare Source
v2025.9.5Compare Source
v2025.8.27Compare Source
v2025.8.22Compare Source
v2025.8.20Compare Source
v2025.8.11Compare Source
v2025.7.21Compare Source
v2025.6.30Compare Source
v2025.6.25Compare Source
v2025.6.9Compare Source
v2025.5.22Compare Source
v2025.4.30Compare Source
v2025.3.31Compare Source
v2025.3.27Compare Source
v2025.3.26Compare Source
v2025.3.25Compare Source
v2025.3.21Compare Source
v2025.2.19Compare Source
v2025.1.26Compare Source
v2025.1.15Compare Source
v2025.1.12Compare Source
v2024.12.23Compare Source
Core changes
--no-windows-filenames(#9591) by pukkandanlinux_exebuilds (#11827) by bashonlyExtractor changes
uploader_idextraction (#11818) by bashonlyv2024.12.13Compare Source
Extractor changes
release_dateextraction (#11759) by MutantPiggieGolem12f1832d2(#11801) by bashonlyMisc. changes
v2024.12.6Compare Source
v2024.12.3Compare Source
v2024.11.18Compare Source
Important changes
Due to a change made by the site, yt-dlp is no longer able to support OAuth login for YouTube. Read more
Core changes
join_nonempty, add**kwargstounpack(#11559) by Grub4Ksubs_list_to_dict: Addlangdefault parameter (#11508) by Grub4KExtractor changes
extoverride for thumbnails (#11545) by bashonlysort_orderextractor-arg (#11569) by bashonlyMisc. changes
>=6.11.1(#11507) by bashonlywebsocketsversion to >=13.0,<14 (#11488) by bashonlyv2024.11.4Compare Source
v2024.10.22Compare Source
Important changes
defaultgroupIf you're installing yt-dlp with pip/pipx or requiring yt-dlp in your own Python project, you'll need to specify
yt-dlp[default]if you want to also install yt-dlp's optional dependencies (which were previously included by default). Read moreThis release's
yt-dlp_min.exewill be the last, and it's actually a PyInstaller-bundled executable so that yt-dlp users updating their py2exe build with-Uwill be automatically migrated. Read moreCore changes
--plugin-dirs(#11277) by coletdjnz, imranh2Popen: Reset PyInstaller environment (#11258) by bashonly, Grub4Ksanitize_path: Reimplement function (#11198) by Grub4KExtractor changes
_VALID_URL(#11269) by seproDevConfiguration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 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.