← All Labs
AI Agent TOCTOU Race — Time-of-Check vs Time-of-Use in Tool Execution
BankBot is an agentic banking assistant. To transfer funds, it (1) checks the source account's balance via check_balance(), then (2) calls transfer_funds() in a separate tool call. Between these two calls, the user can issue a parallel request that drains the account — but BankBot's first transfer still proceeds because its balance check already passed. Trigger the TOCTOU race to overdraft the account.