9.8

CVE-2024-22423: yt-dlp_project yt-dlp OS Command Injection

CVSS: 9.8v3.1CriticalAnalyzed
AliasesGHSA-hjq6-52gw-2g7pPYSEC-2026-2066UBUNTU-CVE-2024-22423
Published 09-04-2024Last modified 13-02-2025

Vulnerability summary

CVE-2024-22423 is a critical (CVSS 9.8) OS Command Injection vulnerability in yt-dlp_project yt-dlp. EPSS estimates a 1.43% chance of exploitation in the next 30 days, higher than 72.7% of scored vulnerabilities. 1 public exploit is recorded.

Overall risk
70/100
0100
High · default modelHow is this calculated?
CVSS score
9.8/10
010
Critical · v3.1 (NVD)
EPSS score
1.43%
0%100%
Low · +0.18 pp in 30 days
KEVNot listedIn no KEV catalog
RansomwareNone recordedNo known use recorded
Public exploits1github

Advisory lineage

Upstream 0 · Downstream 0 · Related 1

Timeline

  1. 09-04-2024
    PublishedVulnerability first disclosed.
  2. 13-02-2025
    Last modifiedVulnerability information updated.

Description

yt-dlp is a youtube-dl fork with additional features and fixes. The patch that addressed CVE-2023-40581 attempted to prevent RCE when using `--exec` with `%q` by replacing double quotes with two double quotes. However, this escaping is not sufficient, and still allows expansion of environment variables. Support for output template expansion in `--exec`, along with this vulnerable behavior, was added to `yt-dlp` in version 2021.04.11. yt-dlp version 2024.04.09 fixes this issue by properly escaping `%`. It replaces them with `%%cd:~,%`, a variable that expands to nothing, leaving only the leading percent. It is recommended to upgrade yt-dlp to version 2024.04.09 as soon as possible. Also, always be careful when using `--exec`, because while this specific vulnerability has been patched, using unvalidated input in shell commands is inherently dangerous. For Windows users who are not able to upgrade, avoid using any output template expansion in `--exec` other than `{}` (filepath); if expansion in `--exec` is needed, verify the fields you are using do not contain `"`, `|` or `&`; and/or instead of using `--exec`, write the info json and load the fields from it instead.

CVSS metrics

4 scores · 4 sources · 1 version

EPSS trend

Probability

1.43%

Chance of exploitation in the next 30 days

Percentile

73%

Versus all other CVEs

30-day change

+0.18 pp

From 1.25% on 21-09-2026

21-09-202621-10-2026
EPSS score
1.43%

Known exploited

Compare KEV catalogs

Not in any of the 3 tracked catalogs.

Public exploits

1 found
  • githubUnverified

    Yt Dlp

    Maturity: poc

Weaknesses

CWE · root cause

Affected systems

Opensuse1 product
  • yt-dlp&distro=openSUSE Tumbleweed< 2024.04.09-1.1
PyPI1 product
  • yt-dlp≥ 2021.04.11, < 2024.04.09
Ubuntu1 product
  • yt-dlpAll versions (No fix recorded)
Yt-dlp1 product
  • yt-dlp≥ 2021.04.11, < 2024.04.09
Yt-dlp_project1 product
  • yt-dlp≥ 2021.04.11, < 2024.04.09

5 vendors · 5 products

References

14 links
Show all 14 references