INCIDENT MAP

Browse / Improper Output Handling / CVE-2024-23750

Code execution in metagpt

CVE-2024-23750 ยท 2024-01-22 high

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

Source: GitHub Advisory Database, used under CC BY 4.0.