Vulnerability · Published Apr 9, 2026 · Assigned by VulDB
CVE-2026-5972FoundationAgents MetaGPT terminal.py Terminal.run_command os command injection
High 7.3
In plain English
A high-severity OS command injection in MetaGPT from FoundationAgents. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 2.7% (higher than 86% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
A vulnerability has been found in FoundationAgents MetaGPT up to 0.8.1. This issue affects the function Terminal.run_command in the library metagpt/tools/libs/terminal.py. The manipulation leads to os command injection. Remote exploitation of the attack is possible. The exploit has been disclosed to the public and may be used. The identifier of the patch is d04ffc8dc67903e8b327f78ec121df5e190ffc7b. Applying a patch is the recommended action to fix this issue.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | metagpt | 0.8.2 | GHSA-wp29-qmvj-frvp |
| PyPI | metagpt | 0.8.2 | PYSEC-2026-2644 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| FoundationAgents | MetaGPT | 0.8.00.8.1 |
Weakness: CWE-78, CWE-77 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P/RL:O/RC:C
References
- VDB-356526 | FoundationAgents MetaGPT terminal.py Terminal.run_command os command injection vdb-entry, technical-description
- VDB-356526 | CTI Indicators (IOB, IOC, TTP, IOA) signature, permissions-required
- Submit #791745 | FoundationAgents MetaGPT 0.8.1 OS Command Injection (CWE-78) third-party-advisory
- https://github.com/FoundationAgents/MetaGPT/issues/1929 exploit, issue-tracking
- https://github.com/paipeline/MetaGPT/commit/d04ffc8dc67903e8b327f78ec121df5e190ffc7b patch
- https://github.com/FoundationAgents/MetaGPT/ product