Command Injection Affecting yt-dlp package, versions [,2025.7.21)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.1% (29th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Command Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-YTDLP-10878169
  • published23 Jul 2025
  • disclosed22 Jul 2025
  • creditgamer191

Introduced: 22 Jul 2025

NewCVE-2025-54072  (opens in a new tab)
CWE-78  (opens in a new tab)

How to fix?

Upgrade yt-dlp to version 2025.7.21 or higher.

Overview

yt-dlp is an A youtube-dl fork with additional features and patches

Affected versions of this package are vulnerable to Command Injection via the function parse_cmd in the class ExecPP, which the --exec process on Windows uses with the default placeholder. An attacker can execute arbitrary commands by supplying a crafted filepath that is insufficiently sanitized.

Note: Users should always be careful when using --exec, because using unvalidated input in shell commands is inherently dangerous.

Workaround

Windows users who are unable to upgrade to the fixed version should avoid using --exec altogether. Instead, consider using --write-info-json or --dump-json with an external script or command line consuming the JSON output.

CVSS Base Scores

version 4.0
version 3.1