# Strapi OS command injection in plugin install/uninstall

Source: https://junglewise.ai/threats/strapi-os-command-injection-in-plugin-install-uninstall-0d28307c  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2021-12-10. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

Severity: low · CVSS 3.1 · Published 2021-12-10

Strapi is an open-source headless CMS platform used by development teams to manage and distribute content. The admin panel allows authorized users to install and uninstall plugins, but the framework fails to properly validate plugin names before executing system commands. An authenticated administrator can exploit this flaw to execute arbitrary code on the server, potentially compromising the entire application, underlying infrastructure, and customer data.

Technologies: [strapi (npm)](https://junglewise.ai/threats/technologies/strapi). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## 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

  ```sh
  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://github.com/strapi/strapi/pull/4636)
- [https://bittherapy.net/post/strapi-framework-remote-code-execution](https://bittherapy.net/post/strapi-framework-remote-code-execution)
- [https://github.com/strapi/strapi](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/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](http://packetstormsecurity.com/files/163950/Strapi-CMS-3.0.0-beta.17.4-Remote-Code-Execution.html)

## Related threats

- [Strapi information disclosure via hidden attributes in admin API](https://junglewise.ai/threats/cve-2022-31367-strapi-information-disclosure-via-hidden-attributes-in-admin-api)
- [Strapi stored cross-site scripting in file upload](https://junglewise.ai/threats/cve-2022-29894-strapi-stored-cross-site-scripting-in-file-upload)
- [Strapi improper input validation in email templates](https://junglewise.ai/threats/cve-2020-13961-strapi-improper-input-validation-in-email-templates)
- [Strapi sensitive information disclosure in admin panel](https://junglewise.ai/threats/cve-2022-30618-strapi-sensitive-information-disclosure-in-admin-panel)
- [Strapi sensitive information disclosure in admin responses](https://junglewise.ai/threats/cve-2022-30617-strapi-sensitive-information-disclosure-in-admin-responses)
