Executive brief
yt-dlp is a popular video downloader that processes URLs from websites and fetches content. The Generic Extractor component has a flaw that allows attackers to intercept (MITM) the tool's network requests by injecting malicious proxy settings through specially crafted URLs. This could lead to credential theft or unauthorized modification of requests to other websites.
Technical details
The vulnerability exists in yt-dlp's URL smuggling mechanism, which allows internal data (like HTTP headers) to be passed between extractors via JSON in URL fragments. The Generic Extractor incorrectly accepts smuggled proxy headers (Ytdl-request-proxy and Ytdl-socks-proxy) from untrusted URLs, allowing an attacker to set an arbitrary HTTP/SOCKS proxy for any subsequent request. Attack requires user interaction: a user must process a malicious webpage or URL. An attacker can then intercept traffic to arbitrary sites, potentially exfiltrating non-secure cookies or injecting malicious responses. The fix removes the ability to smuggle HTTP headers to the Generic Extractor, patched in version 2023.11.14.
Affected products
- yt-dlp yt-dlp 2022.10.04 to 2023.11.13
Timeline
- 2023-11-15: disclosed
- 2023-11-14: patched