Skip to content

Commit db4c9dd

Browse files
1 parent 4b98b10 commit db4c9dd

1 file changed

Lines changed: 79 additions & 0 deletions

File tree

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-22fp-mf44-f2mq",
4+
"modified": "2025-04-18T20:24:08Z",
5+
"published": "2025-04-18T20:24:07Z",
6+
"aliases": [],
7+
"summary": "youtube-dl vulnerable to file system modification and RCE through improper file-extension sanitization",
8+
"details": "#### Description\nThis advisory follows the security advisory [GHSA-79w7-vh3h-8g4j published by the _yt-dlp/yt-dlp_ project](https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-79w7-vh3h-8g4j) to aid remediation of the issue in the _ytdl-org/youtube-dl_ project.\n\n### Vulnerability\n_youtube-dl_ does not limit the extensions of downloaded files, which could lead to arbitrary filenames being created in the download folder (and path traversal on Windows). \n\n### Impact\nSince _youtube-dl_ also reads config from the working directory (and, on Windows, executables will be executed from the _youtube-dl_ directory by default) the vulnerability could allow the unwanted execution of local code, including downloads masquerading as, eg, subtitles.\n\n### Patches\nThe versions of _youtube-dl_ listed as _Patched_ remediate this vulnerability by disallowing path separators and whitelisting allowed extensions. As a result, some very uncommon extensions might not get downloaded.\n\n### Workarounds\nAny/all of the below considerations may limit exposure in case it is necessary to use a vulnerable version\n* have `.%(ext)s` at the end of the output template\n* download from websites that you trust\n* do not download to a directory within the executable search `PATH` or other sensitive locations, such as your user directory or system directories\n* in Windows versions that support it, set [`NoDefaultCurrentDirectoryInExePath`](https://stackoverflow.com/a/50118548) to prevent the _cmd_ shell's executable search adding the default directory before `PATH`\n* consider that the path traversal vulnerability as a result of resolving `non_existent_dir\\..\\..\\target` does not exist in Linux or macOS\n* ensure the extension of the media to download is a common video/audio/... one (use `--get-filename`)\n* omit any of the subtitle options (`--write-subs`/` --write-srt`, `--write-auto-subs`/`--write-automatic-subs`, `--all-subs`).\n\n### References\n* [GHSA-79w7-vh3h-8g4j](https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-79w7-vh3h-8g4j)\n* https://github.com/ytdl-org/youtube-dl/pull/32830",
9+
"severity": [
10+
{
11+
"type": "CVSS_V3",
12+
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
13+
}
14+
],
15+
"affected": [
16+
{
17+
"package": {
18+
"ecosystem": "PyPI",
19+
"name": "youtube-dl"
20+
},
21+
"ranges": [
22+
{
23+
"type": "ECOSYSTEM",
24+
"events": [
25+
{
26+
"introduced": "2015.01.25"
27+
},
28+
{
29+
"fixed": "2024-07-03"
30+
}
31+
]
32+
}
33+
],
34+
"database_specific": {
35+
"last_known_affected_version_range": "<= 2021.12.17"
36+
}
37+
}
38+
],
39+
"references": [
40+
{
41+
"type": "WEB",
42+
"url": "https://github.com/dirkf/youtube-dl/security/advisories/GHSA-22fp-mf44-f2mq"
43+
},
44+
{
45+
"type": "WEB",
46+
"url": "https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-79w7-vh3h-8g4j"
47+
},
48+
{
49+
"type": "ADVISORY",
50+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-38519"
51+
},
52+
{
53+
"type": "WEB",
54+
"url": "https://github.com/ytdl-org/youtube-dl/pull/32830"
55+
},
56+
{
57+
"type": "WEB",
58+
"url": "https://github.com/ytdl-org/youtube-dl/commit/d42a222ed541b96649396ef00e19552aef0f09ec"
59+
},
60+
{
61+
"type": "PACKAGE",
62+
"url": "https://github.com/dirkf/youtube-dl"
63+
},
64+
{
65+
"type": "ADVISORY",
66+
"url": "https://securitylab.github.com/advisories/GHSL-2024-089_youtube-dl"
67+
}
68+
],
69+
"database_specific": {
70+
"cwe_ids": [
71+
"CWE-434",
72+
"CWE-669"
73+
],
74+
"severity": "HIGH",
75+
"github_reviewed": true,
76+
"github_reviewed_at": "2025-04-18T20:24:07Z",
77+
"nvd_published_at": null
78+
}
79+
}

0 commit comments

Comments
 (0)