FoundationAgents MetaGPT Deserialization Vulnerability in Message Handling Allows Code Execution

Vulnerability

A deserialization vulnerability has been identified in FoundationAgents MetaGPT versions through 0.8.2. The issue arises in the Message.check_instruct_content function within metagpt/schema.py. By manipulating the 'mapping' argument, an attacker can execute arbitrary code during the deserialization process. This vulnerability is limited to local execution. The problem has been publicly disclosed, and a proof-of-concept exploit is available.

Impact

Exploitation of this vulnerability allows for arbitrary code execution on the local machine where MetaGPT is running.

Reproduction

The vulnerability can be reproduced by creating a Message object with crafted 'instruct_content' that includes a 'mapping' branch. The 'mapping' should contain a payload that, when deserialized, executes arbitrary code, such as a command injection via the 'os' module.

Remediation

It is recommended to update MetaGPT to a version where this vulnerability has been addressed. Users can check the official GitHub repository for the latest releases.

Added: Jun 2, 2026, 3:20 AM
Updated: Jun 2, 2026, 3:20 AM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
7.5
exploitability
6.0
remediation
0.0
relevance
9.8
threat
6.4
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.