MEDIUM 6.1 npm
Command injection in strapi
GHSA-xrjf-phvv-r4vr · CVE-2022-0764
Published · Modified
AI SAST
Find this class of vulnerability in your own code
Corgea's AI-native static analysis detects vulnerabilities like this one across your repositories, ranks them by exploitability, and returns review-ready fixes.
Description
When creating a strapi app using npxcreate-strapi-app, we can inject arbitrary commands through the template cli argument as per the code in this particular link, this happens due to improper sanitization of user input.
References
- ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2022-0764
- WEB https://github.com/strapi/strapi/issues/12879
- WEB https://github.com/strapi/strapi/commit/2a3f5e988be6a2c7dae5ac22b9e86d579b462f4c
- PACKAGE https://github.com/strapi/strapi
- WEB https://github.com/strapi/strapi/blob/master/packages/generators/app/lib/utils/fetch-npm-template.js#L13
- WEB https://huntr.dev/bounties/001d1c29-805a-4035-93bb-71a0e81da3e5
- WEB https://www.github.com/strapi/strapi/commit/2a3f5e988be6a2c7dae5ac22b9e86d579b462f4c
Ready to move
Start Securing
Free, no credit card | First findings in minutes