CVE-2021-21414 is a high-severity (CVSS 7.2) OS Command Injection vulnerability in @prisma/sdk. A fix is available for @prisma/sdk — see the affected versions and patch details below.
Command injection vulnerability in @prisma/sdk in getPackedPackage function
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2021-21414 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 385,386 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, a proxy for how much of the ecosystem is exposed.
@prisma/sdknpmDescription
Impact
As of today, we are not aware of any Prisma users or external consumers of the @prisma/sdk package who are affected by this security vulnerability.
This issue may lead to remote code execution if a client of the library calls the vulnerable method with untrusted input.
It only affects the getPackedPackage function and this function is not advertised and only used for tests & building our CLI, no malicious code was found after checking our codebase.
Patches
Fixed in
- @prisma/[email protected] (latest channel)
- @prisma/[email protected] (dev channel)
Pull Request closing this vulnerability https://github.com/prisma/prisma/pull/6245
Acknowledgements
This issue was discovered and reported by GitHub Engineer @erik-krogh (Erik Krogh Kristensen).
For more information
If you have any questions or comments about this advisory:
- Create a discussion in the Prisma repository
- Email us at [email protected]
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | @prisma/sdk | all versions | 2.20.0npm install @prisma/sdk@2.20.0 |
Affected Products
prismaprismaDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @prisma/sdk, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update @prisma/sdk to 2.20.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-21414 is resolved across your whole dependency graph.
Workarounds
Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.
Frequently Asked Questions
Is CVE-2021-21414 in your dependencies?
Find it across npm, including transitive dependencies.