Command injection in strapi
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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | strapi | < 4.1.0 | 4.1.0 |
References
- https://nvd.nist.gov/vuln/detail/CVE-2022-0764
- https://github.com/strapi/strapi/issues/12879
- https://github.com/strapi/strapi/commit/2a3f5e988be6a2c7dae5ac22b9e86d579b462f4c
- https://github.com/strapi/strapi
- https://github.com/strapi/strapi/blob/master/packages/generators/app/lib/utils/fetch-npm-template.js#L13
- https://huntr.dev/bounties/001d1c29-805a-4035-93bb-71a0e81da3e5
- https://www.github.com/strapi/strapi/commit/2a3f5e988be6a2c7dae5ac22b9e86d579b462f4c
- CVSS vector
CVSS:3.0/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:L- Weakness (CWE)
CWE-77, CWE-78- Platform
- npm
- Package
strapi- Disclosed
- 27.02.2022
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-xrjf-phvv-r4vr - CC BY 4.0
Vulnerability history: strapi
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 12
- First → latest
- 12.2019 09.2022
- Without a fix
- 3
- Exploited in attacks
- 0
Severity breakdown
- Critical 3
- High 6
- Medium 3
Disclosures per year
- 2019: 1
- 2020: 1
- 2021: 2
- 2022: 8
- 2023: 0
- 2024: 0
- 2025: 0
- 2026: 0
-
Command injection in strapi this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.