{"answers":{"affected":"3 open source packages ship an affected version, including yt-dlp.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-38519 exists.","fix":"Upgrade yt-dlp to 2024.07.01 or later.","what":"CVE-2024-38519 is a high-severity path traversal vulnerability in yt-dlp youtube-dl, published on 2 Jul 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2024-38519 and fix it if it is affected.\n\nWhat it is: CVE-2024-38519 is a high-severity path traversal vulnerability in yt-dlp youtube-dl, published on 2 Jul 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-38519 exists.\n\nAffected packages and fixed versions:\n- yt-dlp (PyPI): affected all versions; fixed in 2024.07.01\n- yt-dlp (PyPI): affected all versions; fixed in 2024.07.01\n- yt-dlp (PyPI): affected all versions; fixed in 2024.07.01\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-38519/ (Markdown: https://insights.sbomify.com/CVE-2024-38519/index.md)","id":"CVE-2024-38519","markdown":"https://insights.sbomify.com/CVE-2024-38519/index.md","name":"CVE-2024-38519","record":{"aliases":["DEBIAN-CVE-2024-38519","GHSA-79w7-vh3h-8g4j","PYSEC-2026-2065","UBUNTU-CVE-2024-38519","openSUSE-SU-2024:14094-1"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution","data_modify"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Video downloader CLI","requires_auth":"none","summary":"Attackers can execute arbitrary code or modify files via improper file-extension sanitization in yt-dlp and youtube-dl downloaders.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":7.8,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-669","name":"Incorrect Resource Transfer Between Spheres"}],"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.\n\n`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.","ecosystems":["PyPI","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"yt-dlp and youtube-dl vulnerable to file system modification and RCE through improper file-extension sanitization","id":"CVE-2024-38519","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"path_traversal","year":"2024"},"n_packages":4,"n_references":8,"next":{"headline":"SoftEther VPN with L2TP - 2.75x Amplification","id":"CVE-2024-38520"},"packages":[{"ecosystem":"PyPI","fixed":["2024.07.01"],"introduced":["0"],"last_affected":[],"package":"yt-dlp","purl":null,"source":"GHSA-79w7-vh3h-8g4j"},{"ecosystem":"PyPI","fixed":["2024.07.01"],"introduced":["0"],"last_affected":[],"package":"yt-dlp","purl":"pkg:pypi/yt-dlp","source":"GHSA-79w7-vh3h-8g4j"},{"ecosystem":"PyPI","fixed":["2024.07.01"],"introduced":["0"],"last_affected":[],"package":"yt-dlp","purl":"pkg:pypi/yt-dlp","source":"PYSEC-2026-2065"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["2024.07.01-1.1"],"introduced":["0"],"last_affected":[],"package":"yt-dlp","purl":"pkg:rpm/opensuse/yt-dlp\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2024:14094-1"}],"prev":{"headline":"bbb-web API additional parameters considered","id":"CVE-2024-38518"},"products":["youtube-dl","yt-dlp"],"published":"2024-07-02","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-08-02","vendors":["yt-dlp","ytdl-org"]},"summary":"Attackers can execute arbitrary code or modify files via improper file-extension sanitization in yt-dlp and youtube-dl downloaders.","url":"https://insights.sbomify.com/CVE-2024-38519/"}