CVE-2021-21414:
Command injection vulnerability in @prisma/sdk in getPackedPackage function
7.7
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.82424%
CWE
Published
4/6/2021
Updated
2/1/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
@prisma/sdk | npm | < 2.20.0 | 2.20.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability exists in getPackedPackage
where user-controlled 'packageDir' was unsafely interpolated into a shell command. The patch replaced string concatenation with shell-quote.quote()
for argument escaping. The test case demonstrates exploitation via backtick injection in packageDir parameter. Runtime detection would show getPackedPackage
processing malicious input during command string construction before the security fix.