Browse / Tool and Agent Misuse / CVE-2026-5974
FoundationAgents MetaGPT vulnerable to OS Command Injection in metagpt/tools/libs/terminal.py
- 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
- https://nvd.nist.gov/vuln/detail/CVE-2026-5974
- https://github.com/FoundationAgents/MetaGPT/issues/1931
- https://github.com/FoundationAgents/MetaGPT/pull/1940
- https://github.com/FoundationAgents/MetaGPT
- https://vuldb.com/submit/791758
- https://vuldb.com/vuln/356528
- https://vuldb.com/vuln/356528/cti
Source: GitHub Advisory Database, used under CC BY 4.0.