yt-dlp: Incorrect Resource Transfer Between Spheres
CVE-2024-38519 is a high-severity incorrect resource transfer between spheres vulnerability in yt-dlp, with a CVSS 3.1 base score of 7.8 out of 10. It can be exploited with local access to the system by an unauthenticated attacker, but only if a user takes part, for example by opening a link or file. The record lists version 2024.07.01 as the first without the flaw, so updating yt-dlp to that release or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.33% chance of exploitation within 30 days, which is low compared with other CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update yt-dlp to 2024.07.01 or a later version.
- Update youtube-dl to 2024-07-03 or a later version.
- Update yt-dlp to 2024.07.01 or a later version.
- Read the advisory on github.com for workarounds and exact fixed builds.
- Because the attack needs a user to take part, warn users about unexpected links and files related to this product until it is patched.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Yt-dlp | yt-dlp | < 2024.07.01 up to, but not including, 2024.07.01 | 2024.07.01 |
| Ytdl-org | youtube-dl | >= 2015.01.25 through 2021.12.17; nightly up to, but not including, 2024-07-03 | 2024-07-03 |
| Yt-dlp Project | yt-dlp | before 2024.07.01 | 2024.07.01 |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- LocalThe attacker needs local access or must trick a user into running something.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- RequiredA user must take an action such as opening a file or link.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H. Scored by CNA (github.com).
Official description
`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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Incorrect Resource Transfer Between Spheres
The product does not properly transfer a resource/behavior to another sphere, or improperly imports a resource/behavior from another sphere, in a manner that provides unintended control over that resource.
More Incorrect Resource Transfer Between Spheres vulnerabilities (CWE-669)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: poc, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Advisories
Patches and release notes
Other references
Other vulnerabilities in yt-dlp
- 8.8 High severity
- 9.6 Critical severity
- 9.6 Critical severity
- 7.4 High severity
- 8.8 High severity
- 8.1 High severity
Recent Incorrect Resource Transfer Between Spheres vulnerabilities
- 7.5 High severity
- 7.5 High severity
- 9.1 Critical severity
- 8.0 High severity
- 8.2 High severity
- 9.6 Critical severity
Spotted an error? Tell us.