Billing vulnerability: failed nested tool calls refund credits that were never charged
Description
Docker distribution (2026-10-24)
Docker Hub distribution: significantgravitas/autogpt. GitHub represents this image under ecosystem Other. The earliest currently listed stable Platform image is v0.7.1; affected image versions are subject to the same feature/configuration prerequisites described in this report. The fixed image tag is significantgravitas/autogpt:v0.9.0 (Docker Hub tag). Numeric package versions correspond to image tags prefixed with v. latest is mutable and is not the fixed-version identifier. The separate significantgravitas/auto-gpt repository distributes Classic and is not covered by this Platform image entry.
Release status (2026-10-24)
Fixed in AutoGPT Platform v0.9.0; included in v0.9.0.
Nested tool calls are charged before execution, and settlement accounts for what was actually charged, preventing refunds of uncharged credits. Fix: #15631.
Fix evidence: ce0a20cecb5f.
Upgrade to v0.9.0 or later. Version numbers below identify Platform releases, whose Git tags are autogpt-platform-beta-v<VERSION>, rather than the backend Python package version.
The reporter retested the original PoC on v0.9.0 and confirmed resolution. The CVSS availability metric is None: the evidence establishes billing abuse, not a loss of service availability. Financial impact is described separately below.
Historical report and evidence
Technical excerpts below describe the code and environment at the time of reporting, unless explicitly identified as a later update.
Summary
AutoGPT Platform refunds a charge it never collected when a tool invoked by OrchestratorBlock fails. Nested tools bypass the main execution queue and are charged only after success. However, post-run billing also reconciles failed tools, using the tool's catalogue price as the presumed pre-flight charge.
An authenticated customer can exploit this by running an agent whose AI Text Generator tool receives an invalid prompt template. The tool fails before calling its provider, but billing adds 60 credits to the customer's balance. In the local reproduction, two failed calls increased the balance from 100 to 219 credits after the orchestrator's own 1-credit cost.
Details
1. The defect is a mismatch between the nested tool's billing order and the executor's reconciliation baseline.
In OrchestratorBlock._execute_single_tool_with_manager(), the orchestrator creates a NodeExecutionEntry and executes it directly. It does not set pre_flight_charge, which defaults to None. The tool is charged only after on_node_execution() returns successfully.
Relevant excerpts, with unrelated statements omitted:
# blocks/orchestrator.py:1161-1171
node_exec_entry = NodeExecutionEntry(
user_id=execution_params.user_id,
...
inputs=final_input_data or {},
execution_context=execution_params.execution_context,
) # pre_flight_charge remains None; no debit has occurred
# blocks/orchestrator.py:1217-1222
tool_node_stats = await execution_processor.on_node_execution(
node_exec=node_exec_entry,
...
)
# blocks/orchestrator.py:1255-1266
if (
not execution_params.execution_context.dry_run
and tool_node_stats.error is None
):
...
await execution_processor.charge_node_usage(node_exec_entry)2. Reconciliation treats the missing charge as a paid charge
ExecutionProcessor.on_node_execution() calls charge_reconciled_usage() for COMPLETED, FAILED, and TERMINATED nodes, passing node_exec.pre_flight_charge as the baseline.
When that value is None, charge_reconciled_usage() recalculates the catalogue price instead of using the amount actually debited:
# executor/billing.py:260-267
if pre_flight_charge is None:
pre_flight, _ = block_usage_cost(block=block, input_data=node_exec.inputs)
else:
pre_flight = pre_flight_charge
post_flight, matching_filter = block_usage_cost(
block=block, input_data=node_exec.inputs, stats=stats
)
delta = post_flight - pre_flight
# executor/billing.py:305-311, personal-wallet branch
remaining_balance = await db_client.spend_credits(
user_id=node_exec.user_id,
cost=delta,
metadata=reconcile_metadata,
fail_insufficient_credits=False,
)For the tested AI Text Generator configuration (gpt-5.5-pro), the catalogue pre-flight price is 60 credits. An invalid template fails before provider usage is recorded, so the actual cost is 0. Reconciliation calculates 0 - 60 = -60; spend_credits() turns this negative cost into a +60-credit USAGE transaction. The orchestrator then skips its post-success charge because the tool failed. No corresponding -60 debit exists.
The main queue records the charge it actually collected in pre_flight_charge before running the node (manager.py:1232-1248). The nested path bypasses that step. The missing value therefore means "no charge recorded" here, but reconciliation interprets it as "use the estimated charge."
Proof of concept
- Deploy the server via docker
<img width="1440" height="900" alt="image" src="github.com/
- Create and execute the agent as the customer and check the wallet after login
After login the browser is at http://127.0.0.1:3903/home; the wallet button at the top right shows Earn credits $1.00 (100 credits = $1.00).
<img width="1440" height="900" alt="image" src="github.com/
- Open the Agents (Library) page
<img width="1440" height="900" alt="image" src="github.com/
- Import > AutoGPT agent: choose agent.json
Use the write_text tool to draft the copy. Call it exactly like this:{"calls": [{"name": "write_text", "arguments": {"prompt": "Write a tagline about {{ topic NONCE-7ae4b055c47b-0"}}, {"name": "write_text", "arguments": {"prompt": "Write a tagline about {{ topic NONCE-7ae4b055c47b-1"}}]}
run NONCE-7ae4b055c47b<img width="1440" height="900" alt="image" src="github.com/
- Builder opens after upload
Click “Upload”; the frontend saves the graph and goes to http://127.0.0.1:3903/build?flowID=68e7d01d-aef7-40bd-ac41-4525bb0f924f&flowVersion=1. On both nodes the “Openai credential” is pre-selected as the system credential “Use Credits for OpenAI” (the operator's platform key, billed in credits).
<img width="1440" height="900" alt="image" src="github.com/
- Click the run button in the bottom toolbar; the “Run Agent” dialog opens with “System credentials”.
<img width="1440" height="900" alt="image" src="github.com/
- Click “Manual Run”. The Orchestrator calls its model, the model emits the two write_text tool calls from the prompt, and each tool run fails on the template before any upstream call.
<img width="1440" height="900" alt="image" src="github.com/
- Reload after the run: the wallet went up
<img width="1440" height="900" alt="image" src="github.com/
- Open Billing > Automation Credits
Open http://127.0.0.1:3903/profile/credits and click “Automation Credits”. The Usage summary shows $1.19 · 1 runs; in Transaction history the row for this run, “Copywriter agent / Agent run”, reads +$1.19: the run increased the balance. The other “Credits granted” rows are environment provisioning (admin top-up, the onboarding reward and its removal), not part of this run.
<img width="1440" height="1373" alt="image" src="github.com/
Impact
A customer can repeatedly create spendable platform credits by causing nested tool calls to fail before recording usage. The added credits enter the normal balance and can fund later executions using the operator's platform credentials.
No administrator access is needed to trigger the vulnerability.
Fix
See the release status above for the shipped remediation and its exact release and commit references.