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 for Arbitrary Command Injection #29

Closed
archcloudlabs opened this issue Jun 20, 2016 · 1 comment
Closed

Potential for Arbitrary Command Injection #29

archcloudlabs opened this issue Jun 20, 2016 · 1 comment
Assignees
Milestone

Comments

@archcloudlabs
Copy link

the functions below in virtualbox.js, could allow for a user to inject additional commands with the cmd variable (ex: "; pwd") resulting in remote command execution assuming this was public facing.

function vboxcontrol(cmd, callback) {
  command('VBoxControl ' + cmd, callback);
}

function vboxmanage(cmd, callback) {
  command(vBoxManageBinary + cmd, callback);
}
@michaelsanford
Copy link
Member

michaelsanford commented Jul 26, 2016

Hi @jaredestroud !

This is certainly true. However, we never expected that these API would ever directly consume public, unfiltered input. As such, node-virtualbox affords no protection against it.

It shouldn't really be the responsibility of node-virtualbox to police input, because:

  1. We have no idea what virtual environment might be running behind the API, and
  2. We have no idea and take no opinion about what the developer chooses to do with their virtual environment: maybe someone actually does need to be able to run sudo rm -rf / for some reason.

We should therefore remain un-opinionated with regard to how the API is used.

Thank you for bringing this up. At the very least, I could add a note in the README to underline this behaviour for those who may not be aware.

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

No branches or pull requests

2 participants