From 9ea3a306a1aeec8e1b98bb9d6d9ae791c006c8f4 Mon Sep 17 00:00:00 2001 From: "advisory-database[bot]" <45398580+advisory-database[bot]@users.noreply.github.com> Date: Wed, 15 Nov 2023 14:49:40 +0000 Subject: [PATCH] Publish GHSA-3ch3-jhc6-5r8x --- .../GHSA-3ch3-jhc6-5r8x.json | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 advisories/github-reviewed/2023/11/GHSA-3ch3-jhc6-5r8x/GHSA-3ch3-jhc6-5r8x.json diff --git a/advisories/github-reviewed/2023/11/GHSA-3ch3-jhc6-5r8x/GHSA-3ch3-jhc6-5r8x.json b/advisories/github-reviewed/2023/11/GHSA-3ch3-jhc6-5r8x/GHSA-3ch3-jhc6-5r8x.json new file mode 100644 index 00000000000..df38cbfd217 --- /dev/null +++ b/advisories/github-reviewed/2023/11/GHSA-3ch3-jhc6-5r8x/GHSA-3ch3-jhc6-5r8x.json @@ -0,0 +1,70 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-3ch3-jhc6-5r8x", + "modified": "2023-11-15T14:48:24Z", + "published": "2023-11-15T14:48:24Z", + "aliases": [ + "CVE-2023-46121" + ], + "summary": "yt-dlp Generic Extractor MITM Vulnerability via Arbitrary Proxy Injection", + "details": "### 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
\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\n\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- \n- \n- \n- \n", + "severity": [ + { + "type": "CVSS_V3", + "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L" + } + ], + "affected": [ + { + "package": { + "ecosystem": "PyPI", + "name": "yt-dlp" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "2022.10.04" + }, + { + "fixed": "2023.11.14" + } + ] + } + ] + } + ], + "references": [ + { + "type": "WEB", + "url": "https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-3ch3-jhc6-5r8x" + }, + { + "type": "ADVISORY", + "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-46121" + }, + { + "type": "WEB", + "url": "https://github.com/yt-dlp/yt-dlp/commit/f04b5bedad7b281bee9814686bba1762bae092eb" + }, + { + "type": "PACKAGE", + "url": "https://github.com/yt-dlp/yt-dlp" + }, + { + "type": "WEB", + "url": "https://github.com/yt-dlp/yt-dlp/releases/tag/2023.11.14" + } + ], + "database_specific": { + "cwe_ids": [ + "CWE-444", + "CWE-613" + ], + "severity": "MODERATE", + "github_reviewed": true, + "github_reviewed_at": "2023-11-15T14:48:24Z", + "nvd_published_at": "2023-11-15T00:15:09Z" + } +} \ No newline at end of file