INCIDENT MAP

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

FoundationAgents MetaGPT vulnerable to os command injection via the Terminal.run_command

CVE-2026-5972 ยท 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.7% chance of exploitation in 30 days

How it works, in short

Arguments passed to the Terminal.run_command agent tool are not safely handled, so injected operating system commands run on the host. (Our summary, written by a model. The source text is below.)

Details

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.

References

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