Cyber Resilience

CVE-2024-22423

RCE in Yt-Dlp Project Yt-Dlp 2021.04.11 – 2024.04.09

Published
09 April 2024
Modified
17 June 2026
Patch / advisory
CVSS Score v3.1 8.3
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H
EPSS Score 0.013 67th percentile
Risk Priority 66 floored blend · peak EPSS

Summary

CVE-2024-22423 is a high-severity OS Command Injection (CWE-78) vulnerability in Yt-Dlp Project Yt-Dlp. Its CVSS base score is 8.3 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Command and Scripting Interpreter (T1059); ranked in the top 33% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SI-10 (Information Input Validation) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

yt-dlp is a command-line tool for downloading video content that introduced support for output template expansion inside the --exec option beginning with version 2021.04.11. A prior attempt to mitigate remote code execution (CVE-2023-40581) by doubling embedded double-quote characters proved insufficient, leaving an avenue for environment-variable expansion that results in OS command injection (CWE-78). The flaw affects all releases between 2021.04.11 and 2024.04.09 and carries a CVSS 3.1 score of 8.3.

An attacker who can influence the media URL, metadata, or output template supplied to yt-dlp can craft input that, when --exec is used, causes the victim’s shell to expand variables and execute arbitrary commands. Exploitation requires the user to invoke --exec with a template containing %q or similar placeholders and therefore depends on both network-supplied data and local command-line usage.

The project’s security advisory and accompanying patches state that version 2024.04.09 resolves the issue by replacing each percent sign with the inert sequence %%cd:~,% so that only a literal percent remains after expansion. Administrators are advised to upgrade immediately; Windows users unable to upgrade should restrict --exec templates to the literal {} placeholder, validate that no field contains ", | or &, or write the info JSON and consume fields from that file instead.

EPSS scores have remained low and essentially flat (current 0.0650, peak 0.0666), indicating no material post-disclosure surge in observed exploitation activity.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

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.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1059 Command and Scripting Interpreter Execution
Adversaries may abuse command and script interpreters to execute commands, scripts, or binaries.
T1059.003 Windows Command Shell Execution
Adversaries may abuse the Windows command shell for execution.
T1059.004 Unix Shell Execution
Adversaries may abuse Unix shell commands and scripts for execution.
T1059.001 PowerShell Execution
Adversaries may abuse PowerShell commands and scripts for execution.
T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2025-54072Same product: Yt-Dlp Project Yt-Dlp
CVE-2026-26331Same product: Yt-Dlp Project Yt-Dlp
CVE-2026-50574Same product: Yt-Dlp Project Yt-Dlp
CVE-2026-55404Same product: Yt-Dlp Project Yt-Dlp
CVE-2023-40581Same product: Yt-Dlp Project Yt-Dlp
CVE-2023-46121Same product: Yt-Dlp Project Yt-Dlp
CVE-2026-50019Same product: Yt-Dlp Project Yt-Dlp
CVE-2026-50023Same product: Yt-Dlp Project Yt-Dlp
CVE-2024-0292Shared CWE-78
CVE-2023-40479Shared CWE-78

Affected Assets

yt-dlp project
yt-dlp
2021.04.11 — 2024.04.09

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V1.2.5
  • V1.2.8
  • V15.2.5

Mitigating Controls (NIST 800-53 r5) AI

Developer testing and evaluation can discover missing or incorrect command sanitization during development.

Input validation directly neutralizes or rejects special characters that would otherwise alter OS command structure.

Least privilege reduces the permissions available to any process that could be subverted by injected commands.

Least functionality restricts available OS commands and interpreters, limiting the blast radius of injection.

Secure engineering principles require proper neutralization of untrusted input before command construction.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

PR.PS-06's SDLC practices directly require secure coding and input handling that blocks command-injection defects, yet the single broad outcome leaves many specific neutralization vectors and verification gaps unaddressed.

PR.PS-02 partial match
prevents

Routine patching/maintenance can remediate known command-injection CVEs in dependencies (partial forward) but does nothing to stop developers from introducing improper neutralization in custom code (none reverse).

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

finds

Security testing and code review target insecure use of operating-system command interfaces, catching command-injection flaws introduced during development.

References