Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Ability to execute random commands in the registry field. #67

Closed
ghost opened this issue Oct 16, 2018 · 2 comments · Fixed by #68
Closed

Ability to execute random commands in the registry field. #67

ghost opened this issue Oct 16, 2018 · 2 comments · Fixed by #68
Labels
bug Something isn't working plugins This issue involves the Plugin Facility vulnerability
Milestone

Comments

@ghost
Copy link

ghost commented Oct 16, 2018

Opened from zowe/zowe-cli#83.

The registry flag can be used to issue arbitrary system commands. For example:

I can shutdown your system by running this command

cli plugins install plugin-name --registry "http://registry.npmjs.org/ && shutdown /s /t 0 /f"

Note: Don't run that command as your computer will shutdown with no ability to abort it. All unsaved work will be lost.

@ghost ghost added bug Something isn't working vulnerability labels Oct 16, 2018
@ghost ghost added this to the Developer milestone Oct 16, 2018
@ghost ghost added the plugins This issue involves the Plugin Facility label Oct 16, 2018
@ghost
Copy link
Author

ghost commented Oct 17, 2018

See solution in #66

@ghost
Copy link
Author

ghost commented Oct 17, 2018

Here is the problem:

const execOutput = execSync(`npm install "${npmPackage}" --prefix ${PMFConstants.instance.PLUGIN_INSTALL_LOCATION} ` +
`-g --registry ${registry}`, {
cwd: PMFConstants.instance.PMF_ROOT,
stdio: pipe
});

It should read:

 const execOutput = execSync(`npm install "${npmPackage}" --prefix "${PMFConstants.instance.PLUGIN_INSTALL_LOCATION}" ` + 
     `-g --registry "${registry}"`, { 
     cwd: PMFConstants.instance.PMF_ROOT, 
     stdio: pipe 
 }); 

ghost pushed a commit that referenced this issue Oct 17, 2018
Signed-off-by: Wright, Christopher R <[email protected]>
@ghost ghost added the 1.0.0 label Oct 17, 2018
ghost pushed a commit that referenced this issue Oct 17, 2018
Signed-off-by: Wright, Christopher R <[email protected]>
@ghost ghost mentioned this issue Oct 17, 2018
@ghost ghost self-assigned this Oct 17, 2018
@ghost ghost added in progress labels Oct 17, 2018
@ghost ghost mentioned this issue Oct 17, 2018
@ghost ghost closed this as completed in #68 Oct 17, 2018
@ghost ghost removed in progress labels Oct 17, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working plugins This issue involves the Plugin Facility vulnerability
Projects
None yet
Development

Successfully merging a pull request may close this issue.

0 participants