Quick answers
- Is This vulnerability exploited in the wild?
- No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
- How severe is This vulnerability?
- Low severity, with a CVSS score of 3.1, published 10 December 2021.
- Which products and versions are affected?
- strapi (npm) SEMVER:introduced=0,fixed=3.0.0-beta.17.8.
- Is there a fix for This vulnerability?
- Yes. strapi (npm): upgrade to 3.0.0-beta.17.8 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is This vulnerability attacked?
- It is attacked over the network, in a software library.
- Am I affected?
- Check whether you run strapi (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- strapi (npm): upgrade to 3.0.0-beta.17.8 or later
npm install strapi@3.0.0-beta.17.8
Technical details
The vulnerability is an OS command injection (CWE-78, CWE-20) in the installPlugin and uninstallPlugin handler functions within packages/strapi-admin/controllers/Admin.js. These functions pass user-supplied plugin names directly to the execa() function without proper sanitization or input validation. An attacker with valid admin credentials (JWT token) can inject shell metacharacters (e.g., &&, ||, $()) into the plugin name parameter to execute arbitrary commands on the host system. The uninstallPlugin function contains a partial regex check (/^[A-Za-z0-9_-]+$/) that was incomplete, while installPlugin lacks any validation. The attack is unauthenticated network-accessible via the /admin/plugins/install or /admin/plugins/uninstall endpoints when admin credentials are present. A successful exploit grants the attacker remote code execution with the privileges of the Node.js process. The vulnerability was patched in version 3.0.0-beta.17.8 via pull request #4636 which validates plugin names properly.
Affected products
- Strapi Strapi before 3.0.0-beta.17.8; all versions <= 3.0.0-beta.17.7
Timeline
- 2019-12-01: disclosed: Issue disclosed to Strapi
- 2019-12-01: patched: Strapi released fix via PR #4636
- 2019-12-03: advisory: NPM issued advisory
- 2021-12-10: other: GHSA-49vv-6q7q-w5cf published (later marked duplicate of GHSA-9p2w-rmx4-9mw7)
- 2025-12-29: other: Advisory withdrawn as duplicate
References
- https://github.com/strapi/strapi/pull/4636
- https://bittherapy.net/post/strapi-framework-remote-code-execution
- https://github.com/strapi/strapi
- http://packetstormsecurity.com/files/163940/Strapi-3.0.0-beta.17.7-Remote-Code-Execution.html
- http://packetstormsecurity.com/files/163950/Strapi-CMS-3.0.0-beta.17.4-Remote-Code-Execution.html