提出 #1059443: philipjscott simple-thumbnail >= 1.1.0 <= 1.6.5 OS Command Injection情報

タイトルphilipjscott simple-thumbnail >= 1.1.0 <= 1.6.5 OS Command Injection
説明Package: simple-thumbnail (npmjs) Weakness: CWE-78 - Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') CVSS 3.1: 9.8 Critical (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) or an 8.8 if behind an authentication gate Package URL: https://www.npmjs.com/package/simple-thumbnail GitHub URL: https://github.com/philipjscott/simple-thumbnail/ simple-thumbnail (specifically versions >= 1.1.0 <= 1.6.5) is used to generate a video thumbnail via ffmpeg. The argument list is built with the genThumbnail(input, output, size, config) function. It spawns ffmpeg with { shell: true }. This means that node uses /bin/sh -c "<command + args>", this means that every element of args is reparsed by the shell. buildArgs() only wraps the user-supplied input/output paths in double quotes and emits the seek value completely unquoted. This is a classic DEP0190 that Node warns against. Please consider the following vulnerable code: ```js function buildArgs (input, output, { width, height, percentage }, seek) { // line 55 const scaleArg = (percentage) ? `-vf scale=iw*${percentage/100}:ih*${percentage/100}` : `-vf scale=${width || -1}:${height || -1}` return [ '-y', `-i ${input}`, '-vframes 1', `-ss ${seek}`, scaleArg, output ] // seek is passed in raw ....SNIP... function ffmpegExecute (path, args, rstream, wstream) { const ffmpeg = spawn(`"${path}"`, args, { shell: true }) // vulnerable sink, L82 ...SNIP... ``` As the seek value is always meant to be user-controllable (for generating thumbnail for a certain timestamp), this is exploitable and results in full RCE as the Node user. Confirmation PoC: ``` $ mkdir /tmp/st && cd /tmp/st && npm i simple-thumbnail $ node -e 'require("simple-thumbnail")("x.mp4","o.png","200x200",{seek:"$(touch pwned)"}).catch(()=>{})' $ ls pwned ``` References: - https://github.com/philipjscott/simple-thumbnail/blob/master/index.js#L81 - https://nodejs.org/api/deprecations.html#dep0190-passing-args-to-nodechild_process-execfilespawn-with-shell-option - https://github.com/philipjscott/simple-thumbnail/issues/88
ソース⚠️ https://github.com/philipjscott/simple-thumbnail/issues/88
ユーザー
 ma1ware (UID 102050)
送信2026年10月27日 14:48 (29 日 ago)
モデレーション2026年11月25日 16:52 (29 days later)
ステータス承諾済み
VulDBエントリ443910 [philipjscott simple-thumbnail 迄 1.6.5 index.js ffmpegExecute seek 特権昇格]
ポイント20

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!