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

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, metagpt (PyPI). Vendors: Deepwisdom, 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

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.