Metagpt
CVE-2026-0761
CRITICAL
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSend crafted string to actionoutput_str_to_mapping function
-
ExploitBypass input validation
-
ExecutionExecute arbitrary Python code
-
ImpactAchieve remote code execution as service account
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | No special conditions — remote unauthenticated exploitation against Foundation Agents MetaGPT with exposed actionoutput_str_to_mapping function accessible over network. |
| Impact | CVSS 9.8, EPSS 2.6%. Higher exploitation probability than the deserialization issue (CVE-2026-0760). Agent outputs are inherently untrusted as they come from LLM responses. |
| Exploit ScenarioDerived | An attacker manipulates LLM outputs (through prompt injection or compromised model) to include code injection payloads in the structured output that MetaGPT's str_to_mapping function evaluates, achieving RCE. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 12, 2026
MetaGPT has a code injection vulnerability in actionoutput_str_to_mapping (EPSS 2.6%) allowing remote attackers to execute arbitrary code through crafted AI agent output processing.
Earlier versions of this analysis (1)
Code injection in MetaGPT output processing enables RCE through crafted agent outputs.
RemediationAI
Update MetaGPT. Replace eval-based parsing with safe JSON parsing. Never evaluate LLM outputs as code.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The actionoutput_str_to_mapping function in MetaGPT has a CWE-94 code injection vulnerability that processes agent output strings using eval-like constructs, allowing injected code to execute.
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
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
DescriptionCVE.org
Foundation Agents MetaGPT actionoutput_str_to_mapping Code Injection Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Foundation Agents MetaGPT. Authentication is not required to exploit this vulnerability.
The specific flaw exists within the actionoutput_str_to_mapping function. The issue results from the lack of proper validation of a user-supplied string before using it to execute Python code. An attacker can leverage this vulnerability to execute code in the context of the service account. Was ZDI-CAN-28124.
Executive ViewAI
A critical remote code execution vulnerability (CVE-2026-0761, CVSS 9.8) affects Foundation Agents MetaGPT installations, allowing unauthenticated attackers to execute arbitrary code. Any organization using MetaGPT faces immediate risk of full system compromise, data breach, and operational disruption. Immediate action is required regardless of patch availability status.
Until patch availability: (1) Implement network segmentation isolating MetaGPT instances from sensitive systems and data; (2) Deploy WAF rules to filter requests containing code injection payloads targeting actionoutput_str_to_mapping; (3) Disable or restrict access to the vulnerable code injection feature; (4) Implement strict input validation and sanitization at application entry points; (5) Monitor for exploitation indicators including unusual process execution and outbound connections; (6) Require multi-factor authentication and least-privilege access to MetaGPT interfaces; (7) Establish 24/7 threat monitoring given EPSS score and lack of patch.
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
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Affected Products (CPE)CVE.org
MetaGPT through 0.6.4 allows the QaEngineer role to execute arbitrary code because RunCode.run_script() passes shell met
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
Cross-site request forgery in FoundationAgents MetaGPT through version 0.8.1 allows unauthenticated remote attackers to
NVD
CVE.org
EPSS
GitHub PoC
Exploit-DB