Vulnerability · Published Jul 22, 2025 · Assigned by GitHub_M
CVE-2025-54072yt-dlp allows `--exec` command injection when using placeholder on Windows
High 7.5
In plain English
A high-severity OS command injection in yt-dlp from yt-dlp. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.7% (higher than 51% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.22 | yt-dlp | 0-r0 | ALPINE-CVE-2025-54072 |
| Alpine:v3.23 | yt-dlp | 0-r0 | ALPINE-CVE-2025-54072 |
| Alpine:v3.24 | yt-dlp | 0-r0 | ALPINE-CVE-2025-54072 |
Affected products (as reported)
Weakness: CWE-78 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
References
- https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-45hg-7f49-5h56 x_refsource_CONFIRM
- https://github.com/yt-dlp/yt-dlp/commit/959ac99e98c3215437e573c22d64be42d361e863 x_refsource_MISC
- https://github.com/yt-dlp/yt-dlp/releases/tag/2025.07.21 x_refsource_MISC