CVE-2023-37274: Python code execution sandbox escape in non-docker version in Auto-GPT

Published Jul 13, 2023
·
Updated

Auto-GPT is an experimental open-source application showcasing the capabilities of the GPT-4 language model. When Auto-GPT is executed directly on the host system via the provided run.sh or run.bat files, custom Python code execution is sandboxed using a temporary dedicated docker container which should not have access to any files outside of the Auto-GPT workspace directory. Before v0.4.3, the executepythoncode command (introduced in v0.4.1) does not sanitize the basename arg before writing LLM-supplied code to a file with an LLM-supplied name. This allows for a path traversal attack that can overwrite any .py file outside the workspace directory by specifying a basename such as ../../../main.py. This can further be abused to achieve arbitrary code execution on the host running Auto-GPT by e.g. overwriting autogpt/main.py which will be executed outside of the docker environment meant to sandbox custom python code execution the next time Auto-GPT is started. The issue has been patched in version 0.4.3. As a workaround, the risk introduced by this vulnerability can be remediated by running Auto-GPT in a virtual machine, or another environment in which damage to files or corruption of the program is not a critical problem.

Affected Software

2 affected components
Agpt Auto-gpt<0.4.3
Agpt Autogpt Classic<0.4.3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Auto-GPT to a version that resolves this vulnerability.

    Fixed in 0.4.3
  2. Compensating control

    Run Auto-GPT inside a virtual machine or another environment where damage to files or corruption of the program is not critical (workaround mentioned for this vulnerability).

Event History

Jul 13, 2023
CVE Published
via MITRE·10:33 PM
Data Sourced
via MITRE·10:33 PM
DescriptionSeverityWeakness
Data Sourced
11:15 PM
DescriptionWeakness
Data Sourced
via NVD·11:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2023-37274?

CVE-2023-37274 has been assigned a medium severity level due to its potential for unauthorized code execution.

2

How do I fix CVE-2023-37274?

To mitigate CVE-2023-37274, update Auto-GPT to version 0.4.4 or later where the vulnerability has been addressed.

3

What systems are affected by CVE-2023-37274?

CVE-2023-37274 affects all versions of Auto-GPT up to 0.4.3.

4

What is the potential impact of CVE-2023-37274?

The potential impact of CVE-2023-37274 includes unauthorized execution of arbitrary Python code within the application.

5

How was CVE-2023-37274 discovered?

CVE-2023-37274 was identified during security assessments of the Auto-GPT application while reviewing its sandboxing mechanisms.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203