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 significant real-world risk despite a CVSS 6.9 base score. The CVSS vector (AV:N/AC:L/PR:N/UI:N) confirms network-accessible, unauthenticated, low-complexity exploitation-no user interaction required. EPSS context is unavailable, but the combination of remote network access, no authentication, and public exploit code substantially elevates risk beyond the base score. The vulnerability's low CVSS impact ratings (VC:L/VI:L/VA:L) reflect conservative CVSS 4.0 scoring rather than true severity; command injection in an AI agent framework can enable lateral movement, data exfiltration, and supply-chain attacks depending on deployment context. KEV status is not confirmed from input, but publicly disclosed exploit code and active GitHub issue discussion indicate operational awareness. Organizations running MetaGPT in production (especially as backend services) should treat this as high-priority. |
| Exploit ScenarioDerived | An attacker sends a malicious request to a MetaGPT agent endpoint, injecting shell metacharacters (e.g., semicolons, pipes, or backticks) into parameters that are passed to Terminal.run_command without sanitization. The injected commands execute with the privileges of the MetaGPT process, allowing the attacker to read sensitive files, modify system state, or pivot to other systems. Publicly available exploit code in the GitHub issue demonstrates proof-of-concept execution. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 09, 2026
Remote code execution in FoundationAgents MetaGPT up to version 0.8.1 allows unauthenticated attackers to execute arbitrary OS commands via improper input validation in the Terminal.run_command function. The vulnerability exploits command injection in metagpt/tools/libs/terminal.py and has publicly available exploit code; patch commit d04ffc8dc67903e8b327f78ec121df5e190ffc7b is available from the vendor.
RemediationAI
Apply the vendor-released patch identified by commit d04ffc8dc67903e8b327f78ec121df5e190ffc7b from the MetaGPT repository. This commit addresses the input validation flaw in Terminal.run_command. Users should upgrade to a patched version released after this commit or manually apply the fix. Until patching is possible, disable or restrict access to the Terminal tool in MetaGPT configurations, and implement network-level controls to limit MetaGPT exposure. For detailed patch information and upgrade guidance, consult the FoundationAgents/MetaGPT GitHub issues (https://github.com/FoundationAgents/MetaGPT/issues/1929) and commit history (https://github.com/paipeline/MetaGPT/commit/d04ffc8dc67903e8b327f78ec121df5e190ffc7b).
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
MetaGPT is an AI-driven framework that processes agent instructions and automates tasks through tool execution. The vulnerability resides in the Terminal.run_command function within the terminal.py library module, which executes system commands without sufficient input sanitization. This is a classic OS command injection flaw (CWE-78) where user-controlled input is passed unsanitized to a system command execution primitive (likely subprocess or os.system in Python). The attack vector is network-accessible because MetaGPT likely exposes the Terminal tool through its agent interface or API, allowing remote command execution without authentication.
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/E:P
Primary rating from Vendor (VulDB) · only source for this CVE.
CVSS VectorVendor: VulDB
Lifecycle Timeline
4DescriptionCVE.org
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.
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/
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
Remote command injection in FoundationAgents MetaGPT versions up to 0.8.1 allows unauthenticated network attackers to ex
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-21049
GHSA-wp29-qmvj-frvp
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB