Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Impact | This vulnerability presents a moderate-to-elevated real-world risk despite the 6.9 CVSS score. The CVSS vector indicates network attack vector with no authentication required, no user interaction, and low attack complexity-favorable conditions for exploitation. CISA's SSVC framework rates this as exploitable via proof-of-concept with automatable attack delivery and partial technical impact (confidentiality, integrity, and availability all affected at low severity). However, the actual risk depends critically on deployment context: if MetaGPT is exposed directly to untrusted network inputs (e.g., via a REST API or web interface), the risk is high; if it operates only in trusted internal environments or as a backend component with controlled inputs, risk is lower. The existence of public POC code and the vendor's lack of response despite early notification through a GitHub PR increase the urgency. EPSS exploitation probability is not provided, but the combination of network reachability, no authentication, and available POC suggests above-average real-world exploitation likelihood. |
| Exploit ScenarioDerived | An attacker gains access to a MetaGPT instance exposed on a network (either directly or via a web API wrapper) and crafts a malicious request containing OS command injection payloads in parameters passed to the Bash.run function. For example, a request with a crafted filename or command argument like |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 09, 2026
Remote command injection in FoundationAgents MetaGPT versions up to 0.8.1 allows unauthenticated network attackers to execute arbitrary OS commands via the Bash.run function in metagpt/tools/libs/terminal.py. The vulnerability has a CVSS score of 6.9 with network-accessible attack vector and low complexity, and matches CISA SSVC criteria for partial technical impact with automatable exploitation; a proof-of-concept exists but no confirmed active exploitation has been reported.
RemediationAI
Vendor-released patch status is listed as available; however, the specific patched version number is not independently confirmed from the provided data. Users should apply the fix referenced in GitHub PR #1940 (https://github.com/FoundationAgents/MetaGPT/pull/1940), which addresses the command injection in the Bash.run function. Organizations unable to patch immediately should implement network-level access controls to restrict who can send requests to MetaGPT services, sanitize all user inputs before passing them to the Bash.run function, and consider running MetaGPT in a sandboxed or containerized environment with minimal OS-level privileges. For the most current patch version and detailed mitigation guidance, consult the vendor's advisory and monitor the GitHub repository for official release updates.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability stems from improper input validation in the Bash.run function located in the MetaGPT library's terminal.py module. MetaGPT is an AI agent framework that processes user inputs to execute commands through a terminal interface. The root cause is classified as CWE-78 (Improper Neutralization of Special Elements used in an OS Command), which occurs when user-supplied data is passed unsanitized to OS command execution functions. The attack leverages the remote accessibility of the Bash.run interface, allowing an attacker to inject malicious shell metacharacters or command separators into parameters that are subsequently executed with the privileges of the MetaGPT process.
Know when Metagpt gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Primary rating from Vendor (VulDB) · only source for this CVE.
CVSS VectorVendor: VulDB
Lifecycle Timeline
2DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
MetaGPT through 0.6.4 allows the QaEngineer role to execute arbitrary code because RunCode.run_script() passes shell met
MetaGPT has a code injection vulnerability in actionoutput_str_to_mapping (EPSS 2.6%) allowing remote attackers to execu
MetaGPT by Foundation Agents has an insecure deserialization in deserialize_message (EPSS 1.7%) enabling remote code exe
Remote command injection in FoundationAgents MetaGPT versions 0.8.0 and 0.8.1 via the get_mime_type function in metagpt/
Remote code execution in FoundationAgents MetaGPT up to version 0.8.1 allows unauthenticated attackers to execute arbitr
Code injection in FoundationAgents MetaGPT versions up to 0.8.1 allows unauthenticated remote attackers to execute arbit
Remote code injection in FoundationAgents MetaGPT up to version 0.8.1 allows unauthenticated attackers to execute arbitr
Code injection in FoundationAgents MetaGPT versions up to 0.8.1 allows unauthenticated remote attackers to execute arbit
Server-side request forgery (SSRF) in FoundationAgents MetaGPT up to version 0.8.1 allows authenticated remote attackers
A code injection vulnerability exists in Foundation Agents MetaGPT up to version 0.8.1, specifically in the DataInterpre
A code injection vulnerability exists in Foundation Agents MetaGPT versions up to 0.8.1 within the code_generate functio
Cross-site request forgery in FoundationAgents MetaGPT through version 0.8.1 allows unauthenticated remote attackers to
EUVD-2026-21072
GHSA-fcc8-4q7h-wvwc
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB