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.com
or douyutv.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 the cdn.bootcdn.net
fallback; or it had been unavailable during a previous run of the Douyu extractor and JavaScript code from cdn.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:
- 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
References
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
References