ffmpeg-tools
Fail
Audited by Gen Agent Trust Hub on Mar 1, 2026
Risk Level: HIGHCOMMAND_EXECUTION
Full Analysis
- [COMMAND_EXECUTION]: The
ffmpeg.jsfile usesexecSyncwith string interpolation to execute shell commands for disk space checks and media probing. IncheckDiskSpace, thedirvariable is interpolated into adfcommand string, and ingetMediaInfo, theinputFileis interpolated into anffprobecommand. Since these values are derived from user-provided file paths, an attacker can execute arbitrary shell commands by using filenames containing shell metacharacters like;,&, or backticks. - [COMMAND_EXECUTION]: The
ffmpeg.jsscript uses theeval()function on ther_frame_ratevalue extracted fromffprobeoutput. If a malicious media file is crafted so thatffprobereturns a string containing JavaScript code as the frame rate, that code will be executed with the privileges of the Node.js process. - [COMMAND_EXECUTION]: The shell scripts
info.shandcompress.shusepython3 -cto perform calculations and formatting. They interpolate shell variables like$DURATION,$BITRATE, and$FPSdirectly into the Python command string. For example, ininfo.sh, variables are placed inside single quotes (e.g.,float('$DURATION' or 0)). An attacker providing a file that causesffprobeto return a string containing a single quote followed by Python commands could achieve arbitrary code execution.
Recommendations
- AI detected serious security threats
Audit Metadata