Bypassing an Admin Feature Flag Through a Side Door
An AI chat feature that admins could disable per tenant was still reachable through the comment feature, which forwarded comment text into the same AI pipeline without checking the flag. An attacker could therefore keep sending user content to the AI model despite the admin's off switch.
Most access control bugs are not about a missing check. They are about a check that lives in the wrong place.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The authorization check was placed on one entry point (the chat endpoint) rather than on the shared AI pipeline itself, so other callers of the pipeline bypassed it.
Impact
The admin's per-tenant off switch for AI processing could be bypassed, which could violate data handling or compliance rules and incur unbudgeted AI provider costs; the author notes it could become cross-tenant data exposure if the history is visible to other users.
What the attacker needed
A valid session; AI chat feature disabled by admin
The fix
The flag check should be enforced inside the shared AI pipeline itself, so every caller is covered regardless of entry point.
How it was found
- Confirm the AI chat endpoint returns a 403 when the feature flag is disabled.
- Post a comment through the comments endpoint.
- Open the AI chat history and observe the comment text with a generated AI reply.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A feature flag is a switch an admin uses to turn a feature on or off. Here the switch was only checked at one entrance to the AI feature, so another part of the app (posting comments) could still reach the same AI processing without anyone noticing. The result is that the admin's off switch did not really turn the feature off.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.