FoundationAgents MetaGPT vulnerable to os command injection via the Terminal.run_command
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 software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | metagpt | < 0.8.2 | 0.8.2 |
References
- https://nvd.nist.gov/vuln/detail/CVE-2026-5972
- https://github.com/FoundationAgents/MetaGPT/issues/1929
- https://github.com/paipeline/MetaGPT/commit/d04ffc8dc67903e8b327f78ec121df5e190ffc7b
- https://github.com/FoundationAgents/MetaGPT
- https://vuldb.com/submit/791745
- https://vuldb.com/vuln/356526
- https://vuldb.com/vuln/356526/cti
- https://pypi.org/project/metagpt
- https://github.com/advisories/GHSA-wp29-qmvj-frvp
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L- Weakness (CWE)
CWE-77- Platform
- Python (PyPI)
- Package
metagpt- Disclosed
- 09.04.2026
- Updated
- 11.10.2026 14:17
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2026-2644 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-wp29-qmvj-frvp - CC BY 4.0
Vulnerability history: metagpt
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 10
- First → latest
- 01.2024 06.2026
- Without a fix
- 8
- Exploited in attacks
- 0
Severity breakdown
- High 1
- Medium 6
- Low 3
Disclosures per year
- 2024: 1
- 2025: 0
- 2026: 9
-
FoundationAgents MetaGPT vulnerable to os command injection via the Terminal.run_command this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.