-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Open discussion about VM module #811
Comments
Due to the issue's sensitivity, I can provide some examples of why we can not do so privately. On top of technical issues, there is also a people problem: very few people are capable and willing to volunteer to run triage & fix these kinds of issues. |
There are a few public examples escapes like this https://gist.github.com/domenic/d15dfd8f06ae5d1109b0 (7 year old) that is referenced in other sandbox projects like VM2. |
By looking at what SES does, it's easy to estimate how much work is needed to provide a secure environment on top of context isolation https://github.com/endojs/endo/tree/master/packages/ses What do we want to achieve here? Explain definitely how using VM for security is a lost cause? |
The idea is to clarify in the threat document that Once it creates a new V8 Context, and I see people arguing that it can avoid prototype pollution. const vm = require('node:vm');
vm.createContext(context);
const code = 'String.prototype.toString = function () { return "tamper" }';
vm.runInContext(code, context);
console.log('X'.toString()) // X I mean, we just need to make that statement clear/strong with a few examples. |
I found this article as a great and clear demonstration:
const vm = require('vm');
const code = 'while(true){}';
vm.runInNewContext(code,{});
console.log('Never gets executed.')
const vm = require('vm');
code = 'var x = this.constructor.constructor("return this")()';
let context = {y : 1}
vm.runInNewContext(code,context);
console.log(context.x); BTW.. I found a very good discussion about VM in this issue too |
All the suggestions made in the WG Meeting will be applied in the Threat Model document. Thanks everybody |
Hi all!
I want to start an open discussion about VM as agreed in the last meeting (#810 ).
We already know that VM can't be considered a security mechanism.
But there is an intense misunderstanding around this in the community. In this discussion, we want to achieve some solid arguments that can clarify why we can't consider VM a security mechanism.
The text was updated successfully, but these errors were encountered: