# CVE-2026-79408: MetaGPT OS command injection in RepoParser

Source: https://junglewise.ai/threats/cve-2026-79408-metagpt-os-command-injection-in-repoparser  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-31. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-79408 · Severity: critical · CVSS 9.8 · Published 2026-08-31

MetaGPT is a framework for autonomous software engineering agents. An OS command injection vulnerability in its repository parser allows attackers to execute arbitrary system commands by crafting malicious directory names or repository paths. An attacker who can control the repository path supplied to MetaGPT can achieve full system compromise in the context of the process running the application.

## Quick answers

**Is CVE-2026-79408 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-79408 being exploited in the wild.

**How severe is CVE-2026-79408?** Critical severity, with a CVSS score of 9.8, published 31 August 2026.

**Which products and versions are affected?** MetaGPT MetaGPT 0.8.1.

**Is there a fix for CVE-2026-79408?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-79408 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-79408?** Check whether anything you run is named in the advisory. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The vulnerability is a classic OS command injection (CWE-78) in the RepoParser.rebuild_class_views() method in metagpt/repo_parser.py. The vulnerable code interpolates an attacker-controlled path argument directly into a shell command string without quoting or escaping, then executes it via subprocess.run(..., shell=True). An attacker can inject shell metacharacters (such as $(...) for command substitution or semicolons for command chaining) in a directory name to achieve arbitrary command execution. The attack requires the ability to influence the path argument, which can occur when processing attacker-supplied repository URLs or workspace directories. No authentication or user interaction is required if the path is directly controllable in the deployment.

## Affected products

- MetaGPT MetaGPT 0.8.1

## Timeline

- 2026-08-31: disclosed

## References

- [https://github.com/REYu6/Metagpt-vul/blob/main/CVE-1-MetaGPT-command-injection.md](https://github.com/REYu6/Metagpt-vul/blob/main/CVE-1-MetaGPT-command-injection.md)
