CVE-2021-33360: stoqey/gnuplot is vulnerable to command injection
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.29571%
CWE
Published
3/10/2023
Updated
3/15/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 |
|---|---|---|---|
| @stoqey/gnuplot | npm | <= 0.0.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability exists in how user-controlled 'filePath' is directly interpolated into shell commands via child_process.exec. The plotCallack function contains two critical insecure patterns: 1) 'exec(touch ${filePath})' and 2) 'exec(gnuplot > ${filePath})' (or similar PDF variant). These implementations allow attackers to inject arbitrary commands through shell metacharacters in the filename parameter. The lack of input validation/sanitization and unsafe command construction directly maps to CWE-77 command injection. The GitHub advisory specifically calls out plotCallack and filePath as vulnerable components.