fix(deps): update dependency yt-dlp to v2024.7.7 [security] #21
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.4.9
->2024.7.7
GitHub Vulnerability Alerts
CVE-2024-38519
Summary
yt-dlp
does 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-dlp
also 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-dlp
version 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)s
at 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.exe
will 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.conf
to 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.net
URL 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.net
is 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.com
ordouyutv.com
URL to yt-dlp as input, or passes a URL that redirects to one of these domains.cdnjs.cloudflare.com
is unavailable or blocked at the time of extraction, necessitating the usage of thecdn.bootcdn.net
fallback; or it had been unavailable during a previous run of the Douyu extractor and JavaScript code fromcdn.bootcdn.net
had 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.net
was discovered to be under control of the same bad actor behind thepolyfill.io
supply chain attack.References
Release Notes
yt-dlp/yt-dlp (yt-dlp)
v2024.7.7
Compare Source
v2024.7.2
Compare Source
v2024.7.1
Compare Source
v2024.5.27
Compare Source
v2024.5.26
Compare Source
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, 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.