# CVE-2026-5972: FoundationAgents MetaGPT terminal.py Terminal.run_command os command injection

- Severity: Medium 6.9 (CVSS:4.0, scored by VulDB) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.72%, higher than 86% of CVEs (2026-12-02)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2026-04-09T19:00:20.513Z
- Modified: 2026-10-26T21:10:00.170Z
- Also known as: GHSA-wp29-qmvj-frvp, PYSEC-2026-2644
- Weaknesses: CWE-77, CWE-78
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: VulDB

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

(As written by CVE List.)

## Affected

- FoundationAgents MetaGPT: 0.8.0; 0.8.1
- metagpt (PyPI): before 0.8.2
- deepwisdom metagpt: up to 0.8.1

## Every score

- VulDB: CVSS:4.0 6.9 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P`
- VulDB: CVSS:3.1 7.3 High `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`
- VulDB: CVSS:3.0 7.3 High `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P/RL:O/RC:C`
- VulDB: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P/E:POC/RL:OF/RC:C`
- GitHub: CVSS:3.1 7.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 7.3 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L`
- PyPA Advisory Database: CVSS:4.0 `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P`

## References

- <https://vuldb.com/submit/791745> (exploit, third-party-advisory, vdb-entry, web)
- <https://github.com/FoundationAgents/MetaGPT/issues/1929> (exploit, issue-tracking, web)
- <https://vuldb.com/vuln/356526> (technical-description, third-party-advisory, vdb-entry, web)
- <https://vuldb.com/vuln/356526/cti> (permissions-required, signature, vdb-entry, web)
- <https://github.com/paipeline/MetaGPT/commit/d04ffc8dc67903e8b327f78ec121df5e190ffc7b> (patch, web)
- <https://github.com/FoundationAgents/MetaGPT/> (product)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-5972> (advisory)
- <https://github.com/FoundationAgents/MetaGPT> (package)
- <https://pypi.org/project/metagpt> (package)
- <https://github.com/advisories/GHSA-wp29-qmvj-frvp> (advisory)

## Sources

- CVE List: [CVE-2026-5972](https://www.cve.org/CVERecord?id=CVE-2026-5972), CVE Terms of Use, modified 2026-04-10
- GitHub Advisory Database: [GHSA-wp29-qmvj-frvp](https://github.com/advisories/GHSA-wp29-qmvj-frvp), CC-BY-4.0, modified 2026-07-13
- NVD: [CVE-2026-5972](https://nvd.nist.gov/vuln/detail/CVE-2026-5972), Public domain, modified 2026-10-26
- PyPA Advisory Database: [PYSEC-2026-2644](https://osv.dev/vulnerability/PYSEC-2026-2644), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-5972 · Whole record: https://cve.day/CVE-2026-5972.json · Rebuilt by cve.day 2026-11-25T22:59:18.421Z
