Node.js · Senior · Question 32 of 75

Why is eval (or new Function) on user input dangerous even in a 'sandbox' like vm?

Explanation

Escapes from vm contexts are well known. Run untrusted code in a separate process or container with strict limits, or avoid running it at all.

Further reading

Problem with a question

Node.js · Senior · question 32

Test yourself

Take the Node.js · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz