Skip to main content

Metagpt CVE-2026-0761

CRITICAL
Code Injection (CWE-94)
2026-01-23 zdi-disclosures@trendmicro.com
9.8
CVSS 3.0 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send crafted string to actionoutput_str_to_mapping function
  2. Exploit
    Bypass input validation
  3. Execution
    Execute arbitrary Python code
  4. Impact
    Achieve 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.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
No patch listed yet 2.6% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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)
v1 Mar 12, 2026 - 21:54 CVSS 9.8

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

NVD PRIMARY 9.8 CRITICAL
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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

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

Why It Matters

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.

Business Impact: Severe
Compensating Controls

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

EPSS Score
2.6%
Top 15% exploitable
Data Quality
3 sources
Confidence: Low

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.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 2.6%
Patch available No
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Out-of-Cycle
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
Very High

Priority Score

52
Low Medium High Critical
KEV: 0
EPSS: +3
CVSS: +49
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

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

cpe:2.3:a:deepwisdom:metagpt:0.8.1:*:*:*:*:*:*:*
CVE-2024-23750 HIGH POC
8.8 Jan 22

MetaGPT through 0.6.4 allows the QaEngineer role to execute arbitrary code because RunCode.run_script() passes shell met

CVE-2026-0760 CRITICAL
9.8 Jan 23

MetaGPT by Foundation Agents has an insecure deserialization in deserialize_message (EPSS 1.7%) enabling remote code exe

CVE-2026-5973 MEDIUM POC
5.5 Apr 09

Remote command injection in FoundationAgents MetaGPT versions 0.8.0 and 0.8.1 via the get_mime_type function in metagpt/

CVE-2026-5972 MEDIUM POC
5.5 Apr 09

Remote code execution in FoundationAgents MetaGPT up to version 0.8.1 allows unauthenticated attackers to execute arbitr

CVE-2026-6110 MEDIUM POC
5.5 Apr 12

Code injection in FoundationAgents MetaGPT versions up to 0.8.1 allows unauthenticated remote attackers to execute arbit

CVE-2026-5971 MEDIUM POC
5.5 Apr 09

Remote code injection in FoundationAgents MetaGPT up to version 0.8.1 allows unauthenticated attackers to execute arbitr

CVE-2026-5970 MEDIUM POC
5.5 Apr 09

Code injection in FoundationAgents MetaGPT versions up to 0.8.1 allows unauthenticated remote attackers to execute arbit

CVE-2026-5974 MEDIUM
6.9 Apr 09

Remote command injection in FoundationAgents MetaGPT versions up to 0.8.1 allows unauthenticated network attackers to ex

CVE-2026-6111 LOW POC
2.1 Apr 12

Server-side request forgery (SSRF) in FoundationAgents MetaGPT up to version 0.8.1 allows authenticated remote attackers

CVE-2026-4516 LOW POC
2.1 Mar 21

A code injection vulnerability exists in Foundation Agents MetaGPT up to version 0.8.1, specifically in the DataInterpre

CVE-2026-4515 LOW POC
2.1 Mar 21

A code injection vulnerability exists in Foundation Agents MetaGPT versions up to 0.8.1 within the code_generate functio

CVE-2026-6109 LOW POC
2.1 Apr 12

Cross-site request forgery in FoundationAgents MetaGPT through version 0.8.1 allows unauthenticated remote attackers to

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy