CVE-2026-4515: Foundation Agents MetaGPT · Code Injection
Affects Foundation Agents MetaGPTSource CVE Database V5
Public exploit available · CVSS 5.3 Medium.
Data as of 1 Nov 2026, 22:58 UTC
- EPSS
- 0.2% chance of exploitation in 30 days – higher than 16% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
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:PExploitation evidence
Disclosed: evidence found.
CVE published 21 Mar 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: evidence found.
CVSS exploit maturity: proof of concept public
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), CVSS vector, the Metasploit, Exploit-DB and nuclei-templates index as of 1 Nov 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| Foundation AgentsMetaGPT | Affected
| Fixed in– |
AI-suggested
- Immediate mitigation should focus on network-level controls: restrict external access to MetaGPT services, especially the code_generate function endpoint, using firewalls or network segmentation to limit exposure.
- Implement strict input validation and sanitization at the application layer where possible to reduce injection risk, even if a patch is not yet available.
- Monitor logs and system behavior for unusual code execution patterns or anomalies indicative of exploitation attempts.
- Employ runtime application self-protection (RASP) or endpoint detection and response (EDR) tools to detect and block suspicious activities related to code injection.
- Engage with the vendor or community to obtain updates or patches as soon as they become available; consider contributing to or reviewing open-source fixes if applicable.
- If feasible, temporarily disable or isolate the vulnerable code_generate functionality until a secure version is released.
- Conduct security awareness and incident response readiness exercises focused on detecting and responding to code injection attacks.
- Review and harden the overall AI agent orchestration environment to minimize lateral movement and privilege escalation opportunities post-exploitation.
Description
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.