Logo
-

Byte Open Security

(ByteOS Network)

Log In

Sign Up

ByteOS

Security
Vulnerability Details
Registries
Custom Views
Weaknesses
Attack Patterns
Filters & Tools
Vulnerability Details :

CVE-2024-38519

Summary
Assigner-GitHub_M
Assigner Org ID-a0819718-46f1-4df5-94e2-005712e83aaa
Published At-02 Jul, 2024 | 13:47
Updated At-02 Aug, 2024 | 04:12
Rejected At-
Credits

yt-dlp and youtube-dl vulnerable to file system modification and RCE through improper file-extension sanitization

`yt-dlp` and `youtube-dl` are command-line audio/video downloaders. Prior to the fixed versions, `yt-dlp` and `youtube-dl` do not limit the extensions of downloaded files, which could lead to arbitrary filenames being created in the download folder (and path traversal on Windows). Since `yt-dlp` and `youtube-dl` also read config from the working directory (and on Windows executables will be executed from the `yt-dlp` or `youtube-dl` directory), this could lead to arbitrary code being executed. `yt-dlp` version 2024.07.01 fixes this issue by whitelisting the allowed extensions. `youtube-dl` fixes this issue in commit `d42a222` on the `master` branch and in nightly builds tagged 2024-07-03 or later. This might mean some very uncommon extensions might not get downloaded, however it will also limit the possible exploitation surface. In addition to upgrading, have `.%(ext)s` at the end of the output template and make sure the user trusts the websites that they are downloading from. Also, make sure to never download to a directory within PATH or other sensitive locations like one's user directory, `system32`, or other binaries locations. For users who are not able to upgrade, keep the default output template (`-o "%(title)s [%(id)s].%(ext)s`); make sure the extension of the media to download is a common video/audio/sub/... one; try to avoid the generic extractor; and/or use `--ignore-config --config-location ...` to not load config from common locations.

Vendors
-
Not available
Products
-
Metrics (CVSS)
VersionBase scoreBase severityVector
Weaknesses
Attack Patterns
Solution/Workaround
References
HyperlinkResource Type
EPSS History
Score
Latest Score
-
N/A
No data available for selected date range
Percentile
Latest Percentile
-
N/A
No data available for selected date range
Stakeholder-Specific Vulnerability Categorization (SSVC)
▼Common Vulnerabilities and Exposures (CVE)
cve.org
Assigner:GitHub_M
Assigner Org ID:a0819718-46f1-4df5-94e2-005712e83aaa
Published At:02 Jul, 2024 | 13:47
Updated At:02 Aug, 2024 | 04:12
Rejected At:
▼CVE Numbering Authority (CNA)
yt-dlp and youtube-dl vulnerable to file system modification and RCE through improper file-extension sanitization

`yt-dlp` and `youtube-dl` are command-line audio/video downloaders. Prior to the fixed versions, `yt-dlp` and `youtube-dl` do not limit the extensions of downloaded files, which could lead to arbitrary filenames being created in the download folder (and path traversal on Windows). Since `yt-dlp` and `youtube-dl` also read config from the working directory (and on Windows executables will be executed from the `yt-dlp` or `youtube-dl` directory), this could lead to arbitrary code being executed. `yt-dlp` version 2024.07.01 fixes this issue by whitelisting the allowed extensions. `youtube-dl` fixes this issue in commit `d42a222` on the `master` branch and in nightly builds tagged 2024-07-03 or later. This might mean some very uncommon extensions might not get downloaded, however it will also limit the possible exploitation surface. In addition to upgrading, have `.%(ext)s` at the end of the output template and make sure the user trusts the websites that they are downloading from. Also, make sure to never download to a directory within PATH or other sensitive locations like one's user directory, `system32`, or other binaries locations. For users who are not able to upgrade, keep the default output template (`-o "%(title)s [%(id)s].%(ext)s`); make sure the extension of the media to download is a common video/audio/sub/... one; try to avoid the generic extractor; and/or use `--ignore-config --config-location ...` to not load config from common locations.

Affected Products
Vendor
yt-dlp
Product
yt-dlp
Versions
Affected
  • From < 2024.07.01 before 2024.07.01 (date)
Vendor
ytdl-org
Product
youtube-dl
Repo
https://github.com/ytdl-org/youtube-dl
Default Status
unaffected
Versions
Affected
  • From >= 2015.01.25 through 2021.12.17 (date)
  • From nightly before 2024-07-03 (date)
    • -> unaffectedfromd42a222
Problem Types
TypeCWE IDDescription
CWECWE-669CWE-669 Incorrect Resource Transfer Between Spheres
Type: CWE
CWE ID: CWE-669
Description: CWE-669 Incorrect Resource Transfer Between Spheres
Metrics
VersionBase scoreBase severityVector
3.17.8HIGH
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Version: 3.1
Base score: 7.8
Base severity: HIGH
Vector:
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Metrics Other Info
Impacts
CAPEC IDDescription
Solutions

Configurations

Workarounds

Exploits

Credits

Timeline
EventDate
Replaced By

Rejected Reason

References
HyperlinkResource
https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-79w7-vh3h-8g4j
x_refsource_CONFIRM
https://github.com/yt-dlp/yt-dlp/commit/5ce582448ececb8d9c30c8c31f58330090ced03a
x_refsource_MISC
https://github.com/yt-dlp/yt-dlp/releases/tag/2024.07.01
x_refsource_MISC
https://securitylab.github.com/advisories/GHSL-2024-090_yt-dlp
x_refsource_MISC
https://github.com/dirkf/youtube-dl/security/advisories/GHSA-22fp-mf44-f2mq
x_refsource_MISC
https://securitylab.github.com/advisories/GHSL-2024-089_youtube-dl/
x_refsource_MISC
https://github.com/ytdl-org/youtube-dl/pull/32830
x_refsource_MISC
https://github.com/ytdl-org/youtube-dl/commit/d42a222ed541b96649396ef00e19552aef0f09ec
x_refsource_MISC
Hyperlink: https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-79w7-vh3h-8g4j
Resource:
x_refsource_CONFIRM
Hyperlink: https://github.com/yt-dlp/yt-dlp/commit/5ce582448ececb8d9c30c8c31f58330090ced03a
Resource:
x_refsource_MISC
Hyperlink: https://github.com/yt-dlp/yt-dlp/releases/tag/2024.07.01
Resource:
x_refsource_MISC
Hyperlink: https://securitylab.github.com/advisories/GHSL-2024-090_yt-dlp
Resource:
x_refsource_MISC
Hyperlink: https://github.com/dirkf/youtube-dl/security/advisories/GHSA-22fp-mf44-f2mq
Resource:
x_refsource_MISC
Hyperlink: https://securitylab.github.com/advisories/GHSL-2024-089_youtube-dl/
Resource:
x_refsource_MISC
Hyperlink: https://github.com/ytdl-org/youtube-dl/pull/32830
Resource:
x_refsource_MISC
Hyperlink: https://github.com/ytdl-org/youtube-dl/commit/d42a222ed541b96649396ef00e19552aef0f09ec
Resource:
x_refsource_MISC
▼Authorized Data Publishers (ADP)
1. CISA ADP Vulnrichment
Affected Products
Vendor
yt-dlp_project
Product
yt-dlp
CPEs
  • cpe:2.3:a:yt-dlp_project:yt-dlp:-:*:*:*:*:*:*:*
Default Status
unknown
Versions
Affected
  • From 0 before 2024.07.01 (custom)
Metrics
VersionBase scoreBase severityVector
Metrics Other Info
Impacts
CAPEC IDDescription
Solutions

Configurations

Workarounds

Exploits

Credits

Timeline
EventDate
Replaced By

Rejected Reason

References
HyperlinkResource
2. CVE Program Container
Affected Products
Metrics
VersionBase scoreBase severityVector
Metrics Other Info
Impacts
CAPEC IDDescription
Solutions

Configurations

Workarounds

Exploits

Credits

Timeline
EventDate
Replaced By

Rejected Reason

References
HyperlinkResource
https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-79w7-vh3h-8g4j
x_refsource_CONFIRM
x_transferred
https://github.com/yt-dlp/yt-dlp/commit/5ce582448ececb8d9c30c8c31f58330090ced03a
x_refsource_MISC
x_transferred
https://github.com/yt-dlp/yt-dlp/releases/tag/2024.07.01
x_refsource_MISC
x_transferred
https://securitylab.github.com/advisories/GHSL-2024-090_yt-dlp
x_refsource_MISC
x_transferred
https://github.com/dirkf/youtube-dl/security/advisories/GHSA-22fp-mf44-f2mq
x_refsource_MISC
x_transferred
https://securitylab.github.com/advisories/GHSL-2024-089_youtube-dl/
x_refsource_MISC
x_transferred
https://github.com/ytdl-org/youtube-dl/pull/32830
x_refsource_MISC
x_transferred
https://github.com/ytdl-org/youtube-dl/commit/d42a222ed541b96649396ef00e19552aef0f09ec
x_refsource_MISC
x_transferred
Hyperlink: https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-79w7-vh3h-8g4j
Resource:
x_refsource_CONFIRM
x_transferred
Hyperlink: https://github.com/yt-dlp/yt-dlp/commit/5ce582448ececb8d9c30c8c31f58330090ced03a
Resource:
x_refsource_MISC
x_transferred
Hyperlink: https://github.com/yt-dlp/yt-dlp/releases/tag/2024.07.01
Resource:
x_refsource_MISC
x_transferred
Hyperlink: https://securitylab.github.com/advisories/GHSL-2024-090_yt-dlp
Resource:
x_refsource_MISC
x_transferred
Hyperlink: https://github.com/dirkf/youtube-dl/security/advisories/GHSA-22fp-mf44-f2mq
Resource:
x_refsource_MISC
x_transferred
Hyperlink: https://securitylab.github.com/advisories/GHSL-2024-089_youtube-dl/
Resource:
x_refsource_MISC
x_transferred
Hyperlink: https://github.com/ytdl-org/youtube-dl/pull/32830
Resource:
x_refsource_MISC
x_transferred
Hyperlink: https://github.com/ytdl-org/youtube-dl/commit/d42a222ed541b96649396ef00e19552aef0f09ec
Resource:
x_refsource_MISC
x_transferred
Information is not available yet
▼National Vulnerability Database (NVD)
nvd.nist.gov
Source:security-advisories@github.com
Published At:02 Jul, 2024 | 14:15
Updated At:02 Jul, 2024 | 17:44

`yt-dlp` is a command-line audio/video downloader. Prior to version 2024.07.01, `yt-dlp` does not limit the extensions of downloaded files, which could lead to aribitrary filenames being created in the download folder (and path traversal on Windows). Since `yt-dlp` also reads config from the working directory (and on Windows executables will be executed from the yt-dlp directory) this could lead to arbitrary code being executed. `yt-dlp` version 2024.07.01 fixes this issue by whitelisting the allowed extensions. This might mean some very uncommon extensions might not get downloaded, however it will also limit the possible exploitation surface. In addition to upgrading, have `.%(ext)s` at the end of the output template and make sure the user trusts the websites that they are downloading from. Also, make sure to never download to a directory within PATH or other sensitive locations like one's user directory, `system32`, or other binaries locations. For users who are not able to upgrade, keep the default output template (`-o "%(title)s [%(id)s].%(ext)s`); make sure the extension of the media to download is a common video/audio/sub/... one; try to avoid the generic extractor; and/or use `--ignore-config --config-location ...` to not load config from common locations.

CISA Catalog
Date AddedDue DateVulnerability NameRequired Action
N/A
Date Added: N/A
Due Date: N/A
Vulnerability Name: N/A
Required Action: N/A
Metrics
TypeVersionBase scoreBase severityVector
Secondary3.17.8HIGH
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Type: Secondary
Version: 3.1
Base score: 7.8
Base severity: HIGH
Vector:
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CPE Matches

Weaknesses
CWE IDTypeSource
CWE-434Secondarysecurity-advisories@github.com
CWE ID: CWE-434
Type: Secondary
Source: security-advisories@github.com
Evaluator Description

Evaluator Impact

Evaluator Solution

Vendor Statements

References
HyperlinkSourceResource
https://github.com/yt-dlp/yt-dlp/commit/5ce582448ececb8d9c30c8c31f58330090ced03asecurity-advisories@github.com
N/A
https://github.com/yt-dlp/yt-dlp/releases/tag/2024.07.01security-advisories@github.com
N/A
https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-79w7-vh3h-8g4jsecurity-advisories@github.com
N/A
https://securitylab.github.com/advisories/GHSL-2024-090_yt-dlpsecurity-advisories@github.com
N/A
Hyperlink: https://github.com/yt-dlp/yt-dlp/commit/5ce582448ececb8d9c30c8c31f58330090ced03a
Source: security-advisories@github.com
Resource: N/A
Hyperlink: https://github.com/yt-dlp/yt-dlp/releases/tag/2024.07.01
Source: security-advisories@github.com
Resource: N/A
Hyperlink: https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-79w7-vh3h-8g4j
Source: security-advisories@github.com
Resource: N/A
Hyperlink: https://securitylab.github.com/advisories/GHSL-2024-090_yt-dlp
Source: security-advisories@github.com
Resource: N/A

Change History

0
Information is not available yet

Similar CVEs

36Records found

Details not found