# CVE-2026-5973: FoundationAgents MetaGPT OS command injection in get_mime_type

Source: https://junglewise.ai/threats/cve-2026-5973-foundationagents-metagpt-os-command-injection-in-get-mime-type  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-09. Updated: 2026-05-10  
License: CC BY 4.0 with a link back

CVE-2026-5973 · Severity: high · CVSS 7.3 · Published 2026-04-09

MetaGPT, a multi-agent framework for AI software development, is vulnerable to a security flaw that allows attackers to execute unauthorized commands on the underlying system. By providing a maliciously crafted filename (for example, within a cloned repository), an attacker can trick the software into running arbitrary code. This could lead to a full system compromise, unauthorized data access, or disruption of AI development operations.

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

## Quick answers

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

**How severe is CVE-2026-5973?** High severity, with a CVSS score of 7.3, published 9 April 2026.

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

**Is there a fix for CVE-2026-5973?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-5973 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-5973?** Check whether you run Deepwisdom Metagpt or 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.

## Technical details

An OS command injection vulnerability exists in FoundationAgents MetaGPT up to version 0.8.1 within the `get_mime_type` function in `metagpt/utils/common.py`. The root cause is the use of `shell_execute()` with an f-string command, which internally triggers `subprocess.run` with `shell=True`. An attacker can exploit this by providing a maliciously crafted filename containing shell metacharacters (e.g., via a cloned repository processed by `repo_to_markdown`). This allows for arbitrary code execution with the privileges of the application. While a pull request (#1983) has been proposed to use list-based arguments to disable shell interpretation, it has not yet been merged.

## Affected products

- FoundationAgents MetaGPT <= 0.8.1

## Identifiers

- CVE-2026-5973
- GHSA-qw5f-qpq5-ppfg
- PYSEC-2026-2641

## Timeline

- 2026-02-04: disclosed: Issue #1930 opened on GitHub
- 2026-03-25: other: Pull request #1983 submitted to fix the vulnerability
- 2026-04-09: advisory: GitHub Advisory and CVE-2026-5973 published

## References

- [https://github.com/FoundationAgents/MetaGPT/issues/1930](https://github.com/FoundationAgents/MetaGPT/issues/1930)
- [https://github.com/FoundationAgents/MetaGPT/pull/1983](https://github.com/FoundationAgents/MetaGPT/pull/1983)
- [https://github.com/FoundationAgents/MetaGPT](https://github.com/FoundationAgents/MetaGPT)
- [https://vuldb.com/submit/791755](https://vuldb.com/submit/791755)
- [https://vuldb.com/vuln/356527](https://vuldb.com/vuln/356527)

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