Skip to content
Heist/ feed
Back to feed
Medium

FoundationAgents MetaGPT terminal.py Terminal.run_command os command injection

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-5972
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 08:05 UTC · Revision 1

Source evidence

FoundationAgents MetaGPT terminal.py Terminal.run_command os command injection

core-osv · Original source

Published 9 Apr 2026, 19:00 UTC

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.

osv:CVE-2026-5972
Complete source record
{
  "id": "0de630d575f244be09848659a7fe04fb9d666a84081f6736d7f1af50cbf8e6f3",
  "url": "https://osv.dev/vulnerability/CVE-2026-5972",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "FoundationAgents MetaGPT terminal.py Terminal.run_command os command injection",
    "summary": "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.",
    "evidence": "osv:CVE-2026-5972",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-5972",
      "aliases": [
        "CVE-2026-5972",
        "GHSA-wp29-qmvj-frvp",
        "PYSEC-2026-2644"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "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"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/foundationagents/metagpt",
              "type": "GIT",
              "events": [
                {
                  "introduced": "feb2d30364e68cd74193d8f7715c3b90fafd02ec"
                },
                {
                  "last_affected": "c036574507e7616c02512e7c8ad88dd847783afa"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0.8.0"
                      },
                      {
                        "last_affected": "0.8.0"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandaloneSingleVersion"
                  },
                  {
                    "range": [
                      {
                        "introduced": "0.8.1"
                      },
                      {
                        "last_affected": "0.8.1"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandaloneSingleVersion"
                  },
                  {
                    "cpe": "cpe:2.3:a:deepwisdom:metagpt:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "last_affected": "0.8.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            },
            {
              "repo": "https://github.com/paipeline/metagpt",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "d04ffc8dc67903e8b327f78ec121df5e190ffc7b"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "fixed": "d04ffc8dc67903e8b327f78ec121df5e190ffc7b"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "0.8.0",
            "0.8.1",
            "v0.8.1",
            "v0.8.0",
            "v0.8.2",
            "v0.3.0",
            "v0.2.1",
            "v0.2.0",
            "v0.1.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-5972.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:27.060788330Z",
      "provider": "osv",
      "references": [
        "https://github.com/FoundationAgents/MetaGPT/",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/5xxx/CVE-2026-5972.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-5972",
        "https://vuldb.com/submit/791745",
        "https://vuldb.com/vuln/356526",
        "https://github.com/FoundationAgents/MetaGPT/issues/1929",
        "https://vuldb.com/vuln/356526/cti",
        "https://github.com/paipeline/MetaGPT/commit/d04ffc8dc67903e8b327f78ec121df5e190ffc7b"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-77",
          "CWE-78"
        ],
        "cna_assigner": "VulDB",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/5xxx/CVE-2026-5972.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-5972",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 493595,
  "published_at": "2026-04-09T19:00:20.513+00:00"
}