---
id: "CVE-2024-6091"
kind: "vulnerability"
aliases: ["CVE-2024-6091", "GHSA-g84q-54hf-36rg"]
title: "AutoGPT bypass of the shell commands denylist settings"
severity: "critical"
cvss: 9.8
epss: 0.00819
exploited: false
status: "open"
category: "ai-tooling"
products: [{"name": "agpt", "fixed": [], "affected": "<= 0.5.1", "ecosystem": "pypi"}, {"name": "agpt autogpt classic", "fixed": [], "affected": "= 0.5.1", "ecosystem": "vendor"}]
ecosystems: ["pypi", "vendor"]
tags: ["ai-agents", "ai-tooling", "autogpt", "cwe-78", "python", "self-hosted"]
not_affected_if: ["no-denylist-configured", "shell-execution-disabled"]
published_at: "2024-09-11T13:15:03+00:00"
first_seen_at: "2026-10-26T21:01:28+00:00"
updated_at: "2026-10-26T21:20:32+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-g84q-54hf-36rg", "first_seen_at": "2026-10-26T21:01:28+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-6091", "first_seen_at": "2026-10-26T21:20:32+00:00"}]
---

# AutoGPT bypass of the shell commands denylist settings

AutoGPT's shell command denylist only matches exact command names such as whoami and /bin/whoami. An attacker who can make the agent run a shell command can slip past the block by writing the path as /bin/./whoami, which the denylist does not recognize.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pypi:agpt affected <= 0.5.1 fixed ?
- vendor:agpt autogpt classic affected = 0.5.1 fixed ?

## How to check

- Check the installed package version with `pip show agpt` and compare it to the affected range (<= 0.5.1).
- Look for shell command denylist settings in the AutoGPT configuration and confirm whether any are in use.

## Fix

- Upgrade the `agpt` package past `0.5.1`; the fixed version is unknown from the sources.
- Until upgraded, disable the shell execution component or restrict the agent's commands to an allowlist instead of a denylist.

## Timeline

- 2026-10-26T21:01:28+00:00 ghsa https://github.com/advisories/GHSA-g84q-54hf-36rg
- 2026-10-26T21:20:32+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2024-6091

## From the sources

A vulnerability in significant-gravitas/autogpt version 0.5.1 allows an attacker to bypass the shell commands denylist settings. The issue arises when the denylist is configured to block specific commands, such as `whoami` and `/bin/whoami`. An attacker can circumvent this restriction by executing commands with a modified path, such as `/bin/./whoami`, which is not recognized by the denylist.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
