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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Primary rating from Vendor (VulDB) · only source for this CVE.
CVSS VectorVendor: VulDB
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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Lifecycle Timeline
3DescriptionCVE.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.
AnalysisAI
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.
Technical ContextAI
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.
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.
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
Same weakness CWE-77 – Command Injection
View allSame technique Command Injection
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-34985
GHSA-h4jg-8v58-57wj