CVE-2026-4516 Details
Description
A vulnerability was found in Foundation Agents MetaGPT up to 0.8.1. This vulnerability affects unknown code of the file metagpt/actions/di/write_analysis_code.py of the component DataInterpreter. The manipulation results in injection. It is possible to launch the attack remotely. The exploit has been made public and could be used. The vendor was contacted early about this disclosure but did not respond in any way.
A remote code execution vulnerability exists in Foundation Agents MetaGPT versions through 0.8.1, specifically within the DataInterpreter component. The issue arises from inadequate input validation on user-provided prompts in the file 'metagpt/actions/di/write_analysis_code.py'. This vulnerability allows for prompt injection, where an attacker can manipulate the language model into generating malicious Python code that is automatically executed in a Jupyter Notebook environment, without any security checks or sandbox restrictions.
Short-term mitigations include implementing strict input validation on the 'user_requirement' parameter to remove common prompt injection patterns, establishing a code review mechanism that requires human approval before executing generated code, and restricting the use of the Terminal tool in the MetaGPT framework. Long-term solutions involve creating a sandboxed execution environment for running code, validating the safety of code generated by the language model, and engineering prompts to prevent injection attacks.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Mar 23, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/Ka7arotto/cve/blob/main/MetaGPT-rce2.md | [email protected] | Broken Link |
| https://vuldb.com/?ctiid.352081 | [email protected] | Permissions RequiredVDB Entry |
| https://vuldb.com/?id.352081 | [email protected] | Third Party AdvisoryVDB Entry |
| https://vuldb.com/?submit.773930 | [email protected] | Third Party AdvisoryVDB Entry |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-707 | Improper Neutralization | [email protected] |
| CWE-74 | Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| deepwisdom metagpt | <= 0.8.1 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 29, 2026 | Initial Analysis | [email protected] |
| Apr 29, 2026 | Data Remediation | [email protected] |
| Mar 21, 2026 | New CVE Received | [email protected] |