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

VMError: Unexpected access to key 'Symbol(nodejs.util.inspect.custom)' #431

Closed
loynoir opened this issue Apr 21, 2022 · 3 comments · Fixed by #433
Closed

VMError: Unexpected access to key 'Symbol(nodejs.util.inspect.custom)' #431

loynoir opened this issue Apr 21, 2022 · 3 comments · Fixed by #433

Comments

@loynoir
Copy link

loynoir commented Apr 21, 2022

Error from '3.9.6' to '3.9.9'.

Last ok version is '3.9.5'

@XmiliaH
Copy link
Collaborator

XmiliaH commented Apr 21, 2022

I do not have a clue what you are doing.

@loynoir
Copy link
Author

loynoir commented Apr 21, 2022

  • vm2 newbee on day1
  • spawn a node 16 repl and run the example "What is the difference between Node's vm and vm2?"

nodejs repl, vm2 3.9.5

> const {VM} = require('vm2');
> new VM().run('this.constructor.constructor("return process")().exit()');
> // OK

nodejs repl, vm2 3.9.9

> const {VM} = require('vm2');
> new VM().run('this.constructor.constructor("return process")().exit()');
Uncaught VMError: Unexpected access to key 'Symbol(nodejs.util.inspect.custom)'

@XmiliaH
Copy link
Collaborator

XmiliaH commented Apr 21, 2022

This is caused by node violating JS proxy rules in inspect. It should be easy to fix that this error does not occur any more. However, the underlying problem is not that easy to fix.

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

Successfully merging a pull request may close this issue.

2 participants