GHSA-3v33-3wmw-3785: yt-dlp has dependency on potentially malicious third-party code in Douyu extractors
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.
Published Jul 8, 2024
Affected packages
yt-dlp
- Ecosystem
- PyPI
- Affected
- >= 2023.09.24, < 2024.07.07
- Fixed in
- 2024.07.07
- Check
pip show yt-dlp
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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:
- The user has PhantomJS installed on their system.
- The user passes a
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:
- Avoid using the Douyu extractors (
--ies default,-douyutv,-douyushow) - Uninstall (or do not install) PhantomJS
Acknowledgement
Thanks to @LeSuisse for reporting this promptly after bootcdn.net was discovered to be under control of the same bad actor behind the polyfill.io supply chain attack.
References
- https://github.com/yt-dlp/yt-dlp/commit/6075a029dba70a89675ae1250e7cdfd91f0eba41
- https://sansec.io/research/polyfill-supply-chain-attack
Credited to LeSuisse, bashonly.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More PyPI vulnerabilities
All PyPI entriesCVE-2026-55404
yt-dlp: Downstream command injection via improper sanitization of yt-dlp --write-link output
high7.5Jul 24, 2026CVE-2026-50019
yt-dlp: File Downloader cookie leak with curl
medium6.1Jun 16, 2026CVE-2026-50023
yt-dlp: Dangerous file type creation via insufficient filename sanitization (Bypass of CVE-2024-38519)
high8.3Jun 16, 2026CVE-2026-50574
yt-dlp: Arbitrary code execution via manifest downloads with aria2c
high8.3Jun 16, 2026GHSA-69qj-pvh9-c5wg
yt-dlp: Arbitrary command injection possible if --exec option used with yt-dlp
high7.5Jun 16, 2026CVE-2026-26331
yt-dlp: Arbitrary Command Injection when using the `--netrc-cmd` option
high8.8Feb 23, 2026
