Skip to content
HighVulnerabilityLLM-specific

CVE-2023-37274: Auto-GPT path traversal in execute_python_code via basename argument

Identifier
CVE-2023-37274
Published
Record updated
View JSON
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.4%

Summary

CVE-2023-37274 affects Auto-GPT versions before v0.4.3, where the `execute_python_code` command (introduced in v0.4.1) does not sanitize the `basename` argument. An LLM-supplied name such as `../../../main.py` lets code write outside the workspace directory, overwriting files like `autogpt/main.py`, which then runs on the host outside the Docker sandbox at the next start.

Mitigation

The issue has been patched in version 0.4.3. As a workaround, run Auto-GPT in a virtual machine or another environment where damage to files or corruption of the program is not a critical problem.