LiveActive security incident?Get immediate response
CVE Record

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

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 `execute_python_code` 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.

HighCVSS 7.6Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

Auto-GPT versions before 0.4.3 could let AI-generated Python code escape its intended workspace when run directly on a host. The bug could overwrite Python files outside the workspace and lead to host code execution when Auto-GPT is restarted. This is serious for experimental or agentic deployments handling untrusted prompts or tasks.

Executive priority

Treat this as high priority for teams experimenting with Auto-GPT or agentic code execution. The business risk is host compromise from a tool expected to sandbox generated code, especially on developer workstations or automation hosts with sensitive files.

Technical view

The vulnerable execute_python_code command accepted an LLM-supplied basename without sanitization. A traversal value could cause Auto-GPT to write Python code outside the workspace, overwrite existing .py files, and later execute altered host-side code. The issue affects Significant-Gravitas Auto-GPT before 0.4.3 and is classified as CWE-94.

Likely exposure

Exposure is most likely where Auto-GPT before 0.4.3 was run directly on the host using run.sh or run.bat with Python execution enabled. Systems running fixed versions or isolated disposable environments have materially reduced risk.

Exploitation context

The source bundle does not show CISA KEV listing or cited active exploitation. Exploitation requires the affected Auto-GPT workflow and attacker influence over LLM-supplied code execution inputs. CVSS indicates local attack vector, high complexity, low privileges, and user interaction.

Researcher notes

The core issue is inadequate basename validation before file write, enabling workspace escape and later code execution through overwritten Python files. Evidence supports patch availability in 0.4.3 and an isolation workaround. Evidence in the bundle does not support claims of broad exploitation.

Mitigation direction

  • Upgrade Auto-GPT to version 0.4.3 or later.
  • Run affected Auto-GPT instances inside a virtual machine or disposable isolated environment.
  • Review vendor guidance before re-enabling Python code execution workflows.
  • Rebuild affected deployments from trusted source if unexpected Python file changes are found.

Validation and detection

  • Inventory Auto-GPT deployments and record exact versions.
  • Confirm whether run.sh or run.bat was used directly on host systems.
  • Check whether execute_python_code workflows were enabled or used.
  • Review Auto-GPT directories for unexpected modified .py files.
  • Confirm the patched version is deployed before returning systems to normal use.
Prepared
Confidence
high
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-94: Code execution behavior lookup

Code execution and unsafe deserialization weaknesses often justify reviewing execution behavior and process telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

Execution behavior lookup

The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
description · low confidence lookup

Privilege behavior lookup

The CVE wording references privilege impact, so privilege escalation and authorization behavior review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
description · low confidence lookup

File access behavior lookup

The CVE wording references file access or upload behavior, so file telemetry and web shell review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
description · low confidence lookup

Container behavior lookup

The affected technology mentions containers, so container-specific ATT&CK technique review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2023-37274 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
7.6 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
3Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
7.6CVSS 3.1HighCVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H0.86Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

7.6High
CVSS 3.1 vector shape for CVE-2023-37274Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
Significant-GravitasAuto-GPT< 0.4.3Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-94 · source CWE mapping

Improper Control of Generation of Code ('Code Injection')

Improper Control of Generation of Code ('Code Injection') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.