OS Command Injection Affecting yt-dlp package, versions <0-r0


Severity

Recommended
low

Based on default assessment until relevant scores are available.

Threat Intelligence

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 OS Command Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-ALPINE322-YTDLP-10877632
  • published23 Jul 2025
  • disclosed22 Jul 2025

Introduced: 22 Jul 2025

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

How to fix?

Upgrade Alpine:3.22 yt-dlp to version 0-r0 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream yt-dlp package and not the yt-dlp package as distributed by Alpine. See How to fix? for Alpine:3.22 relevant fixed versions and status.

yt-dlp is a feature-rich command-line audio/video downloader. In versions 2025.06.25 and below, when the --exec option is used on Windows with the default placeholder (or {}), insufficient sanitization is applied to the expanded filepath, allowing for remote code execution. This is a bypass of the mitigation for CVE-2024-22423 where the default placeholder and {} were not covered by the new escaping rules. Windows users who are unable to upgrade should avoid using --exec altogether. Instead, the --write-info-json or --dump-json options could be used, with an external script or command line consuming the JSON output. This is fixed in version 2025.07.21.