yt-dlp projectのyt-dlpにおけるOS コマンドインジェクションの脆弱性
タイトル yt-dlp projectのyt-dlpにおけるOS コマンドインジェクションの脆弱性
概要

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

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

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

公表日 2024年4月9日0:00
登録日 2026年1月7日18:25
最終更新日 2026年1月7日18:25
CVSS3.0 : 緊急
スコア 9.8
ベクター CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
影響を受けるシステム
yt-dlp project
yt-dlp 2021.04.11 以上 2024.04.09 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
その他
変更履歴
No 変更内容 変更日
1 [2026年01月07日]
  掲載
2026年1月7日18:25

NVD脆弱性情報
CVE-2024-22423
概要

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.

公表日 2024年4月10日3:15
登録日 2024年4月10日10:01
最終更新日 2024年11月21日17:56
関連情報、対策とツール
共通脆弱性一覧