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. |
| Impact | While the CVSS base score of 6.3 is moderate, multiple real-world risk indicators elevate concern: the exploit has been publicly disclosed and is actively available on GitHub, reducing barriers to exploitation; the attack requires only low privileges and low attack complexity with network accessibility, meaning any authenticated user can trigger the vulnerability; and the vendor's failure to respond to disclosure suggests no patch timeline exists. The CVSS vector notation (E:P/RL:X/RC:R) indicates proof-of-concept availability with unconfirmed reproducibility. The attack vector (AV:N) combined with low privilege requirements (PR:L) makes this exploitable in cloud-deployed MetaGPT instances or any scenario where untrusted users have legitimate system access. The confluence of public POC availability, unpatched vendor status, and network accessibility creates a high practical exploitation probability despite the moderate numerical CVSS score—this should be treated as a high-priority issue in any environment running MetaGPT 0.8.1 or earlier, particularly where the platform processes external inputs or multi-tenant access exists. |
| Exploit ScenarioDerived | An authenticated user with access to a MetaGPT deployment submits a specially crafted input to the code_generate function in metagpt/ext/aflow/scripts/operator.py that includes malicious Python code. Due to insufficient input sanitization, this malicious code is incorporated directly into the generated code and executed within the MetaGPT process context, allowing the attacker to exfiltrate sensitive data, modify system state, or pivot to other systems accessible from the MetaGPT host. The publicly available POC on GitHub significantly lowers the skill barrier for exploitation, making this accessible to opportunistic attackers or insider threats with basic system access. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 21, 2026
A code injection vulnerability exists in Foundation Agents MetaGPT versions up to 0.8.1 within the code_generate function of metagpt/ext/aflow/scripts/operator.py, allowing authenticated remote attackers to execute arbitrary code. The vulnerability is classified as CWE-94 (improper control of generation of code) and carries a CVSS score of 6.3 with network-based attack vector requiring low privileges. A public exploit has been disclosed on GitHub, and the vendor has not responded to early disclosure attempts, elevating the practical risk despite the moderate CVSS rating.
RemediationAI
Immediately upgrade Foundation Agents MetaGPT to a version newer than 0.8.1; however, verify that a patched release is available from the vendor before upgrading, as the vendor has not publicly confirmed a fix timeline. If a patched version is unavailable, implement network-level access controls to restrict access to the metagpt/ext/aflow/scripts/operator.py endpoint to trusted sources only, and disable the code_generate function if it is not required for your operational use case. Additionally, apply principle of least privilege by ensuring MetaGPT processes run with minimal required permissions and operate in isolated environments (containers or VMs) to limit the blast radius of code injection exploitation. Monitor for suspicious code generation patterns and consider implementing input validation filters at the application level if feasible. Until patching, treat any unauthenticated or semi-trusted access to MetaGPT instances as high-risk and restrict to internal networks only.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability resides in the code generation mechanism of MetaGPT, an AI-driven multi-agent framework used for software development automation. The affected component (metagpt/ext/aflow/scripts/operator.py) contains the code_generate function which fails to properly sanitize or validate user-supplied input before processing it as executable code. This represents a classic code injection flaw (CWE-94: Improper Control of Generation of Code) where attacker-controlled data is incorporated into dynamically generated code without adequate safeguards. MetaGPT serves as an agent orchestration platform, and compromising the code generation pipeline allows attackers to inject malicious instructions that will be executed within the framework's runtime context. The CPE designation (cpe:2.3:a:foundation_agents:metagpt:*:*:*:*:*:*:*:*) indicates all versions up to and including 0.8.1 are vulnerable.
Know when Foundation Agents 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
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
Lifecycle Timeline
4DescriptionCVE.org
A vulnerability has been found in Foundation Agents MetaGPT up to 0.8.1. This affects the function code_generate of the file metagpt/ext/aflow/scripts/operator.py. The manipulation leads to code injection. It is possible to initiate the attack remotely. The exploit has been disclosed to the public and may be used. The vendor was contacted early about this disclosure but did not respond in any way.
Executive ViewAI
Organizations using Foundation Agents MetaGPT should be aware of moderate risk from CVE-2026-4515, a code injection vulnerability rated CVSS 6.3. Exploitation could allow attackers to execute code or inject malicious input. Proof-of-concept code is publicly available. Organizations should apply vendor updates when available and monitor for exploitation.
Apply vendor patch. If patching is delayed: deploy WAF rules, restrict network access, enable logging.
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.
EUVD-2026-14250
GHSA-6qq6-2j27-fq65
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB