{"id":"CVE-2026-26331","published":"2026-02-24T02:23:40Z","modified":"2026-02-24T20:08:47Z","title":"yt-dlp: Arbitrary Command Injection when using the `--netrc-cmd` option","vendor":"yt-dlp","product":"yt-dlp","tier":"tail","description":{"text":"yt-dlp is a command-line audio/video downloader. Starting in version 2023.06.21 and prior to version 2026.02.21, when yt-dlp's `--netrc-cmd` command-line option (or `netrc_cmd` Python API parameter) is used, an attacker could achieve arbitrary command injection on the user's system with a maliciously crafted URL. yt-dlp maintainers assume the impact of this vulnerability to be high for anyone who uses `--netrc-cmd` in their command/configuration or `netrc_cmd` in their Python scripts. Even though the maliciously crafted URL itself will look very suspicious to many users, it would be trivial for a maliciously crafted webpage with an inconspicuous URL to covertly exploit this vulnerability via HTTP redirect. Users without `--netrc-cmd` in their arguments or `netrc_cmd` in their scripts are unaffected. No evidence has been found of this exploit being used in the wild. yt-dlp version 2026.02.21 fixes this issue by validating all netrc \"machine\" values and raising an error upon unexpected input. As a workaround, users who are unable to upgrade should avoid using the `--netrc-cmd` command-line option (or `netrc_cmd` Python API parameter), or they should at least not pass a placeholder (`{}`) in their `--netrc-cmd` argument.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01793,"percentile":0.78954,"provenance":"source"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"references":[{"url":"https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-g3gw-q23r-pgqm","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/yt-dlp/yt-dlp/commit/1fbbe29b99dc61375bf6d786f824d9fcf6ea9c1a","tags":["x_refsource_MISC"]},{"url":"https://github.com/yt-dlp/yt-dlp/releases/tag/2026.02.21","tags":["x_refsource_MISC"]}],"priority":{"score":27.0,"factors":[{"name":"EPSS percentile","points":15.79},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":6.16}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2026-02-22","earliestUrl":"https://github.com/dxlerYT/CVE-2026-26331","repos":[{"name":"dxlerYT/CVE-2026-26331","url":"https://github.com/dxlerYT/CVE-2026-26331","stars":1,"created":"2026-02-22"}]},"first":{"date":"2026-02-22","source":"PoC-in-GitHub","url":"https://github.com/dxlerYT/CVE-2026-26331"},"provenance":"source"},"vendorSlug":"yt-dlp","affectedVersions":[{"vendor":"yt-dlp","product":"yt-dlp","versions":[">= 2023.06.21, < 2026.02.21"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-02-24T20:08:27.991642Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"yt-dlp","vulnerableRanges":[">=2023.06.21, <2026.02.21"],"patched":["2026.02.21"],"from":["GHSA-g3gw-q23r-pgqm","PYSEC-2026-3432"],"provenance":"source"}],"summary":{"text":"A command injection flaw in yt-dlp, the command-line audio/video downloader, lets a crafted URL execute arbitrary commands through the --netrc-cmd option (or the netrc_cmd Python API parameter) in affected versions. Exploitation requires that the user has --netrc-cmd set in their command, configuration, or script, and that they visit or download from a malicious URL, which can be delivered through a webpage that redirects over HTTP without any authentication.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T05:38:03Z"},"euvd":{"id":"EUVD-2026-7408","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2023-46121","published":"2023-11-14","fixed":"2023.11.14","kev":false},{"cve":"CVE-2024-22423","published":"2024-04-09","fixed":"2024.04.09","kev":false},{"cve":"CVE-2024-38519","published":"2024-07-02","fixed":"2024.07.01","kev":false},{"cve":"CVE-2026-26331","published":"2026-02-24","fixed":"2026.02.21","kev":false},{"cve":"CVE-2026-50019","published":"2026-06-23","fixed":"2026.6.9","kev":false,"link":{"from":"CVE-2026-26331","to":"CVE-2026-50019","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:yt-dlp","fromFixed":"2026.02.21","toFixed":"2026.6.9","daysApart":119}]}},{"cve":"CVE-2026-50023","published":"2026-06-23","fixed":"2026.6.9","kev":false,"link":{"from":"CVE-2026-26331","to":"CVE-2026-50023","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:yt-dlp","fromFixed":"2026.02.21","toFixed":"2026.6.9","daysApart":119}]}},{"cve":"CVE-2026-50574","published":"2026-06-23","fixed":"2026.6.9","kev":false,"link":{"from":"CVE-2026-26331","to":"CVE-2026-50574","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:yt-dlp","fromFixed":"2026.02.21","toFixed":"2026.6.9","daysApart":119}]}}],"package":"PyPI:yt-dlp"}}