Quick answers
- Is This vulnerability exploited in the wild?
- No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
- How severe is This vulnerability?
- Informational severity, published 3 September 2020.
- Which products and versions are affected?
- safe-eval (npm) all versions.
- Is there a fix for This vulnerability?
- No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
- How is This vulnerability attacked?
- It is attacked over the network, in a software library.
- Am I affected?
- Check whether you run safe-eval (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
Technical details
This is a sandbox escape vulnerability in safe-eval affecting all versions. The vulnerability exploits JavaScript function constructor chains (specifically leveraging callee and caller constructors) to bypass sandbox restrictions and gain access to the global process object. An attacker can craft a malicious payload that uses Object.defineProperty and getter functions to invoke the Function constructor with arbitrary code, allowing execution of Node.js commands like child_process.execSync(). No authentication or user interaction is required; the vulnerability is triggered when any untrusted code is evaluated through safe-eval. No patch is currently available; the developers recommend using an alternative package.
Affected products
- npm safe-eval all versions
Timeline
- 2020-09-03: disclosed