You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because console.log uses inspect and inspect violates the proxy specs by directly interacting with the target, it is possible to escape through console.log.
Since node's inspect used by console.log strips one layer of proxys, wrap it in two.
The inner one uses a simple shared handler. Fixespatriksimek#241.
Also allow to connect a host object with a sandbox offset. This allowes to override the Buffer.prototype.inspect method with a saver, in sandbox one, fixespatriksimek#187 for now, however we should have a look if other objects expose a custom inspect method.
XmiliaH
added a commit
to XmiliaH/vm2
that referenced
this issue
Sep 13, 2019
Since node's inspect used by console.log strips one layer of proxys, wrap it in two.
The inner one uses a simple shared handler. Fixespatriksimek#241.
Also allow to connect a host object with a sandbox offset. This allowes to override the Buffer.prototype.inspect method with a saver, in sandbox one, fixespatriksimek#187 for now, however we should have a look if other objects expose a custom inspect method.
Because console.log uses inspect and inspect violates the proxy specs by directly interacting with the target, it is possible to escape through console.log.
Only idea I have so far is to double wrap objects from the vm in two Proxys. Inspect will remove the outer one but respect the second one.
This is new in node 12, maybe was there in 8, but likely not in 10.
The text was updated successfully, but these errors were encountered: