製品・ソフトウェアに関する情報
yt-dlp projectのyt-dlpにおけるOS コマンドインジェクションの脆弱性
Title yt-dlp projectのyt-dlpにおけるOS コマンドインジェクションの脆弱性
Summary

yt-dlpは、追加機能と修正が施されたyoutube-dlのフォークです。--execオプションで特定の出力テンプレートを展開する際、不適切なエスケープ処理が原因でリモートコードが実行されるリスクがありました。この問題はバージョン2024.04.09で修正されました。利用者はできるだけ早く最新版にアップグレードし、--execオプションを使用する際は、検証されていない入力に注意する必要があります。

Possible impacts 当該ソフトウェアが扱う全ての情報が外部に漏れる可能性があります。 また、当該ソフトウェアが扱う全ての情報が書き換えられる可能性があります。 さらに、当該ソフトウェアが完全に停止する可能性があります。 そして、この脆弱性を悪用した攻撃の影響は、他のソフトウェアには及びません。 
Solution

正式な対策が公開されています。ベンダ情報を参照して適切な対策を実施してください。

Publication Date April 9, 2024, midnight
Registration Date Jan. 7, 2026, 6:25 p.m.
Last Update Jan. 7, 2026, 6:25 p.m.
CVSS3.0 : 緊急
Score 9.8
Vector CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Affected System
yt-dlp project
yt-dlp 2021.04.11 以上 2024.04.09 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
その他
Change Log
No Changed Details Date of change
1 [2026年01月07日]
  掲載
Jan. 7, 2026, 6:25 p.m.

NVD Vulnerability Information
CVE-2024-22423
Summary

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.

Publication Date April 10, 2024, 3:15 a.m.
Registration Date April 10, 2024, 10:01 a.m.
Last Update Nov. 21, 2024, 5:56 p.m.
Related information, measures and tools
Common Vulnerabilities List