You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SEC: Agent Subscription Management by Shared Users (BOLA) #182
Location: PUT /api/subscriptions/agents/{name}, DELETE /api/subscriptions/agents/{name} — routers/subscriptions.py lines 184, 218
Impact
A user with shared read access to an agent can:
Assign any subscription (Claude API OAuth token) to that agent
Clear its subscription assignment
Both operations trigger a container restart
This enables hot-swapping Claude credentials, DoS by clearing the subscription, and cross-account subscription abuse (unexpected billing/rate-limit consumption).
Root Cause
routers/subscriptions.py line 184 uses the permissive can_user_access_agent check (owners + admins + shared users) instead of can_user_share_agent (owners + admins only). The endpoint docstring states "Owner access required" but the implementation enforces only "any access". Same issue at line 218 for DELETE.
Remediation
Replace db.can_user_access_agent with db.can_user_share_agent (owner/admin only) in both PUT and DELETE handlers
Audit all other mutation endpoints for the same authorization predicate confusion
Add test asserting non-owner shared users receive HTTP 403 on subscription mutation endpoints
Fixed in a2c4012. Replaced can_user_access_agent with can_user_share_agent in both PUT and DELETE /api/subscriptions/agents/{name} handlers. Shared users now get HTTP 403 on subscription mutation — only owners and admins can assign/clear subscriptions. Read-only auth status endpoint unchanged. 7 unit tests added.
Activity
fix: Restrict subscription PUT/DELETE to owner/admin (BOLA fix) (Abil…
docs: Update subscription flow doc with corrected auth predicate
vybe commentedon Mar 27, 2026
Fixed in a2c4012. Replaced
can_user_access_agentwithcan_user_share_agentin both PUT and DELETE/api/subscriptions/agents/{name}handlers. Shared users now get HTTP 403 on subscription mutation — only owners and admins can assign/clear subscriptions. Read-only auth status endpoint unchanged. 7 unit tests added.fix(security): Subscription BOLA — restrict assign/clear to owner/adm…
docs: Update subscription management flow for BOLA fix (#182)
refactor(auth): INV-8 imperative auth-guard family — consolidate inli…
feat(ui): Skills management surface — unhide and rebuild the Skills t…