# CVE-2024-23750: Code execution in metagpt

Source: https://junglewise.ai/threats/cve-2024-23750-code-execution-in-metagpt  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2024-01-22  
License: CC BY 4.0 with a link back

CVE-2024-23750 · Severity: low · CVSS 3.1 · Published 2024-01-22

MetaGPT through 0.6.4 allows the QaEngineer role to execute arbitrary code because RunCode.run_script() passes shell metacharacters to subprocess.Popen.

Technologies: [metagpt (PyPI)](https://junglewise.ai/threats/technologies/pypi-metagpt). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2024-23750 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2024-23750 being exploited in the wild.

**How severe is CVE-2024-23750?** Low severity, with a CVSS score of 3.1, published 22 January 2024.

**Which products and versions are affected?** metagpt (PyPI) ECOSYSTEM:introduced=0,fixed=0.6.5, ECOSYSTEM:introduced=0,last_affected=0.6.6.

**Is there a fix for CVE-2024-23750?** Yes. metagpt (PyPI): upgrade to 0.6.5 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2024-23750?** Check whether you run metagpt (PyPI) 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

- metagpt (PyPI): upgrade to 0.6.5 or later

  ```sh
  pip install "metagpt>=0.6.5"
  ```


## Affected products

- metagpt (PyPI) ECOSYSTEM:introduced=0,fixed=0.6.5, ECOSYSTEM:introduced=0,last_affected=0.6.6

## Identifiers

- CVE-2024-23750
- GHSA-g7ph-8423-pf4j
- PYSEC-2024-9

## Related threats

- [FoundationAgents MetaGPT unsafe deserialization in Message.check_instruct_content](https://junglewise.ai/threats/cve-2026-10566-foundationagents-metagpt-unsafe-deserialization-in-message-check)
- [FoundationAgents MetaGPT SSRF in decode_image](https://junglewise.ai/threats/cve-2026-6111-foundationagents-metagpt-ssrf-in-decode-image)
- [FoundationAgents MetaGPT code injection in Tree-of-Thought Solver](https://junglewise.ai/threats/cve-2026-6110-foundationagents-metagpt-code-injection-in-tree-of-thought-solver)
- [FoundationAgents MetaGPT RCE via CSRF in Mineflayer HTTP API](https://junglewise.ai/threats/cve-2026-6109-foundationagents-metagpt-rce-via-csrf-in-mineflayer-http-api)
- [FoundationAgents MetaGPT OS command injection in Bash tool](https://junglewise.ai/threats/cve-2026-5974-foundationagents-metagpt-os-command-injection-in-bash-tool)
