INCIDENT MAP

Browse / Tool and Agent Misuse / CVE-2026-5974

FoundationAgents MetaGPT vulnerable to OS Command Injection in metagpt/tools/libs/terminal.py

CVE-2026-5974 ยท 2026-04-09 moderate

Class
Tool and Agent Misuse (filed by a model that read the advisory)
Technique
Code and command execution
Affected
metagpt (PyPI)
CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
EPSS
2.6% chance of exploitation in 30 days

How it works, in short

The terminal tool's Bash.run passes unsanitised input to the OS shell, letting an attacker inject extra commands. (Our summary, written by a model. The source text is below.)

Details

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.

References

Source: GitHub Advisory Database, used under CC BY 4.0.