Skip to content

← Actionable
High, CVSS 7.8amended

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

GHSA-22fp-mf44-f2mq

What to do

Vendor response not established. Follow the primary source's mitigation guidance and check back for a fix.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • PyPI youtube-dl

    Affected
    >= 2015.1.25, <= 2021.12.17
    Fixed in
    no fixed version recorded

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
7.8 · CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS
No dated EPSS signal available.
Source description

As published by the source; long descriptions are shortened.

Description This advisory follows the security advisory GHSA-79w7-vh3h-8g4j published by the yt-dlp/yt-dlp project to aid remediation of the issue in the ytdl-org/youtube-dl project. Vulnerability 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). Impact Since 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. Patches The 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. Master code d42a222 or later and nightly builds tagged 2024-07-03 or later contain the remediation. Workarounds Any/all of the below…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 2 · amended ·

    Amended from ghsa record GHSA-22fp-mf44-f2mq

  2. Revision 1 · created ·

    Published from osv record GHSA-22fp-mf44-f2mq

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: GHSA-22fp-mf44-f2mq

Advisory: youtube-dl vulnerable to file system modification and RCE through improper file-extension sanitization
IDs: GHSA-22fp-mf44-f2mq
Record: https://patchnext.com/advisories/ghsa-22fp-mf44-f2mq (revision 2, source checked 26 Oct 2026, 13:32 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: High (CVSS 7.8)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor response not established. A vendor fix does not mean a deployment is fixed.

## Affected components
- PyPI youtube-dl: affected >= 2015.1.25, <= 2021.12.17

## Suggested inspection (read-only)
- `python -m pip show youtube-dl`: prints the installed version. Run with the environment that serves production active.

## Supported action
No complete vendor fix is recorded. Follow the primary source's mitigation guidance and check this record again before closing anything.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on youtube-dl.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://osv.dev/vulnerability/GHSA-22fp-mf44-f2mq (OSV record GHSA-22fp-mf44-f2mq lists affected ranges: PyPI youtube-dl >=2015.01.25 <=2021.12.17)
- Verified: https://github.com/advisories/GHSA-22fp-mf44-f2mq (GitHub-reviewed advisory GHSA-22fp-mf44-f2mq lists affected ranges: PyPI youtube-dl >=2015.1.25 <=2021.12.17)

Commands are suggestions: review each one before running it.

Loading voting…