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 19 August 2020.
- Which products and versions are affected?
- safer-eval (npm) SEMVER:introduced=0,fixed=1.3.2.
- Is there a fix for This vulnerability?
- Yes. safer-eval (npm): upgrade to 1.3.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is This vulnerability attacked?
- It is attacked with local access, in a software library.
- Am I affected?
- Check whether you run safer-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.
How to fix
- safer-eval (npm): upgrade to 1.3.2 or later
npm install safer-eval@1.3.2
Technical details
The vulnerability is a sandbox breakout in safer-eval caused by improper restriction of the Object.constructor property. An attacker can use Object.constructor to escape the sandbox and execute arbitrary code on the host system. The vulnerability affects all versions prior to 1.3.2, where the fix explicitly disallows Object.constructor usage by prepending Object.constructor = function () {}; to the evaluated code. No special authentication or network access is required—exploitation only requires the ability to pass malicious code to the safer-eval library for evaluation.
Affected products
- commenthol safer-eval before 1.3.2
Timeline
- 2019-06-05: patched: Fix committed (Object.constructor restriction added)