Browse / Improper Output Handling / CVE-2024-23750
Code execution in metagpt
- Class
- Improper Output Handling (filed by a model that read the advisory)
- Technique
- Code and command execution
- Also involves
- Tool and Agent Misuse
- Affected
- metagpt (PyPI)
- CVSS
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS
- 1.0% chance of exploitation in 30 days
How it works, in short
The QA role's script runner passes model-written strings containing shell metacharacters to Popen, so generated content runs arbitrary commands. (Our summary, written by a model. The source text is below.)
Details
MetaGPT through 0.6.4 allows the QaEngineer role to execute arbitrary code because RunCode.run_script() passes shell metacharacters to subprocess.Popen.
References
- https://nvd.nist.gov/vuln/detail/CVE-2024-23750
- https://github.com/geekan/MetaGPT/issues/731
- https://github.com/geekan/MetaGPT
- https://github.com/pypa/advisory-database/tree/main/vulns/metagpt/PYSEC-2024-9.yaml
Source: GitHub Advisory Database, used under CC BY 4.0.