A member removed from an organization keeps creating workflows in it with an API key made while a member
Description
An External API key created while a user was a member of an organization kept working in that organization after the user was removed from it. A removed member could go on creating workflows, library entries and schedules in the former organization through External API v1. Upgrade to v0.11.3 or later.
Impact
A former member who still held such a key, with the WRITE_GRAPH and WRITE_LIBRARY scopes (or USE_TOOLS, for schedules), could add workflows, library entries and schedules to the organization they had been removed from, where its remaining members saw them. The key gave no read access to the organization's data, and a team-restricted key kept its team the same way.
Fix
Fixed in AutoGPT Platform v0.11.3.
An API key issued in an organization now works only while its owner is an active member of that organization, and of its team if the key is restricted to one. External API v1 refuses a former member's key before the request reaches the route, and leaving or being removed from a team revokes the keys restricted to it.
Fix evidence: f2cc414a1d78.
Upgrade to v0.11.3 or later. Version numbers in this advisory identify Platform releases, whose Git tags are autogpt-platform-beta-v<VERSION>, rather than the backend Python package version. The significantgravitas/autogpt Docker image is tagged v<VERSION>.
Workarounds
Organization owners cannot revoke another member's API keys, so ask a member to revoke the keys they created for the organization before removing them. Self-hosting operators can mark a removed member's keys for that organization as revoked in the APIKey table.
---
Details
create_api_keyinautogpt_platform/backend/backend/api/features/api_keys/routes.pystored the request's organization, and an optional team, on theAPIKeyrow.remove_org_memberinautogpt_platform/backend/backend/api/features/orgs/db.pydeleted the member's organization and team memberships, and the route stopped their runs in progress, but their API keys stayedACTIVE.validate_api_keyinautogpt_platform/backend/backend/data/auth/api_key.pychecked only the key's hash and status and returned the stored organization and team.require_permissioninautogpt_platform/backend/backend/api/external/middleware.py, which every v1 route used, checked only scopes.create_graph(POST /external-api/v1/graphs, inautogpt_platform/backend/backend/api/external/v1/routes.py) wrote the key's organization and team onto the new workflow and its library entry.run_agent(POST /external-api/v1/tools/run-agent, inautogpt_platform/backend/backend/api/external/v1/tools.py) put the key's organization on its session; given a cron, it created a schedule tagged with that organization.- External API v2 re-checked membership on every request (
resolve_credential_tenancyinautogpt_platform/backend/backend/api/external/v2/tenancy.py) and refused the same key. v1 had no equivalent check.
v1 reads returned only the caller's own records, and runs started with the key, scheduled runs included, were attributed to the caller's personal organization. The gap was introduced in v0.6.67 by #12670 (commit 0b32f690c2).
References
- Fix commit f2cc414a1d78, first released in v0.11.3
- Introduced by #12670
Timeline
Reported 2026-11-09 · Triaged 2026-11-09 · Fixed 2026-11-15 · Published 2026-11-17.
Credits
This issue was initially discovered by Microsoft's Codename MDASH and validated by Dongkwan Kim and HyungSeok Han of Microsoft Security FORGE Lab. It was also found independently by an automated security scan run by Anthropic.