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
Thanks for your contribution. I really honor your efforts.
Nonetheless a breakout from the VM is still possible. The only limitation is that child_process is somehow prevented to be required.
If someone tries to obfuscate require("child_process") (greetings from white-space or brain fuck) or uses ES5 import statement together with node@>=10 experimental flags we will be facing the same issue again.
Right, something as simple as require("child_" + "process") will still enable "breaking out". I don't think the proposed solution solves the core issue.
A slightly more robust way of fixing (in line with the proposed solution) would be to build an AST of the provided code and check the strings it contains. This would solve the obfuscated strings issue, but would not catch more complex hacks like:
var child = "child";
var process = "process";
var cp = require([child, process].join("_"))
Overview
safer-eval is a safer approach for eval in node and browser.
Affected versions of this package are vulnerable to Arbitrary Code Execution via generating a
RangeError: Maximum call stack size exceeded
.Proof of Concept (Credit: Jonathan Leitschuh)
Bug Bounty
We have opened up a bounty for this issue on our bug bounty platform. Want to solve this vulnerability and get rewarded 💰? Go to https://huntr.dev/
We will submit a pull request directly to your repository with the fix as soon as possible. Want to learn more? Go to https://github.com/418sec/huntr 📚
Automatically generated by @huntr-helper...
The text was updated successfully, but these errors were encountered: