---
id: CVE-2026-5974
aliases:
  - GHSA-fcc8-4q7h-wvwc
  - PYSEC-2026-2639
title: >-
  FoundationAgents MetaGPT vulnerable to OS Command Injection in
  metagpt/tools/libs/terminal.py
summary: >-
  FoundationAgents MetaGPT vulnerable to OS Command Injection in
  metagpt/tools/libs/terminal.py
severity: high
cvss: 7.3
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L'
vendor: metagpt
product: metagpt
ecosystem: pip
affected:
  - metagpt <= 0.8.1
published: '2026-04-09'
updated: '2026-07-13'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-fcc8-4q7h-wvwc'
references:
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-5974'
  - url: 'https://github.com/FoundationAgents/MetaGPT/issues/1931'
  - url: 'https://github.com/FoundationAgents/MetaGPT/pull/1940'
  - url: 'https://github.com/FoundationAgents/MetaGPT'
  - url: 'https://vuldb.com/submit/791758'
  - url: 'https://vuldb.com/vuln/356528'
  - url: 'https://vuldb.com/vuln/356528/cti'
tags:
  - osv
  - pip
epss: 0.02464
epssPercentile: 0.8378
ingestedAt: '2026-07-13T18:57:57.246Z'
---

## Overview

A vulnerability was determined in FoundationAgents MetaGPT up to 0.8.1. The affected element is the function Bash.run in the library metagpt/tools/libs/terminal.py. This manipulation causes os command injection. The attack is possible to be carried out remotely. The project was informed of the problem early through a pull request but has not reacted yet.

## Affected packages

- `metagpt <= 0.8.1`

## Remediation

Refer to the advisory for the patched release.
