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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Lifecycle Timeline
6DescriptionCVE.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.
AnalysisAI
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.
Technical ContextAI
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.
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.
MetaGPT through 0.6.4 allows the QaEngineer role to execute arbitrary code because RunCode.run_script() passes shell met
MetaGPT has a code injection vulnerability in actionoutput_str_to_mapping (EPSS 2.6%) allowing remote attackers to execu
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
Cross-site request forgery in FoundationAgents MetaGPT through version 0.8.1 allows unauthenticated remote attackers to
Same weakness CWE-94 – Code Injection
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-14250
GHSA-6qq6-2j27-fq65