chore(deps): update dependency yt-dlp to v2026.2.21 [security]#472
Merged
chore(deps): update dependency yt-dlp to v2026.2.21 [security]#472
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. |
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.4→2026.2.21GitHub Vulnerability Alerts
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
Configuration
📅 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 these updates again.
This PR was generated by Mend Renovate. View the repository job log.