CVE-2020-7609:
Code Injection in node-rules
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.65538%
CWE
Published
12/10/2021
Updated
2/1/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
node-rules | npm | >= 3.0.0, < 5.0.0 | 5.0.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the fromJSON
function's unsafe handling of user input. The commit diff shows this function used eval()
on raw user-controlled strings from JSON input to recreate function objects. As eval()
executes any arbitrary code in the input strings, and the function accepted user-controlled rules argument without validation, this creates a code injection vector. Multiple sources (CVE, GHSA, Snyk, and the patch commit) explicitly identify fromJSON
as the vulnerable entry point that was removed in the patched version.