Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. yt-dlp
  4. ›
  5. GHSA-3v33-3wmw-3785

GHSA-3v33-3wmw-3785: yt-dlp has dependency on potentially malicious third-party code in Douyu extractors

July 8, 2024

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:

  1. The user has PhantomJS installed on their system.
  2. 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.
  3. 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.

References

  • github.com/advisories/GHSA-3v33-3wmw-3785
  • github.com/yt-dlp/yt-dlp
  • github.com/yt-dlp/yt-dlp/commit/6075a029dba70a89675ae1250e7cdfd91f0eba41
  • github.com/yt-dlp/yt-dlp/security/advisories/GHSA-3v33-3wmw-3785
  • sansec.io/research/polyfill-supply-chain-attack

Code Behaviors & Features

Detect and mitigate GHSA-3v33-3wmw-3785 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 2023.09.24 before 2024.07.07

Fixed versions

  • 2024.07.07

Solution

Upgrade to version 2024.07.07 or above.

Source file

pypi/yt-dlp/GHSA-3v33-3wmw-3785.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:55 +0000.