CVE-2024-48964: OS Command Injection in Snyk gradle plugin
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.0821%
CWE
Published
10/23/2024
Updated
10/30/2024
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| snyk-gradle-plugin | npm | < 4.5.0 | 4.5.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from two key issues: 1) getCommand in lib/index.ts manually wrapped paths in quotes rather than using proper argument escaping, making it vulnerable to command termination characters in directory names. 2) sub-process.ts's execute() function used shell:true with quoteAll instead of escapeAll, failing to properly neutralize special characters. The patch fixed both by removing manual quoting, switching to escapeAll, and disabling shell execution. These functions directly handled untrusted input (directory paths) and were central to the command injection mechanism.