Summary
FlaskBB up to version 2.2.0 contains an authorization bypass that lets authenticated moderators perform actions on topics outside the forums they are allowed to manage.
By crafting batch requests with mixed topic IDs, a moderator can cause permission checks to succeed on one valid topic and then apply lock, unlock, delete, or hide operations to unauthorized topics.
Affected context
This vulnerability arises in FlaskBB's forum moderation interface when batch operations are performed on multiple topics at once.
It manifests in deployments where moderators can submit lists of topic IDs for bulk actions and the backend applies permission checks only to the first topic in the batch, implicitly trusting the rest.
The risk is limited to authenticated users with moderator-level privileges, but it extends to any forum whose topics can be referenced by ID in bulk action requests.
Exploit preconditions
- Attack surface: Web application endpoints handling bulk topic moderation (lock, unlock, delete, hide).
- Required access: Valid moderator account with rights over at least one forum and the ability to submit crafted HTTP requests (e.g., via browser dev tools or scripts).
- Trigger point: Submission of a batch request containing a topic from an authorized forum alongside topics from forums the moderator is not permitted to control.
- Why exploitation is possible: The authorization check is applied only to the first topic ID in the list, and its result is reused for subsequent topics without per-resource validation, enabling actions on unauthorized topics.
Why this happens
The underlying issue is incomplete authorization enforcement on a per-resource basis during bulk operations, mapping to CWE-863: Incorrect Authorization.
Instead of validating permissions for each topic ID in the batch, the implementation checks access for only the first item and implicitly assumes that the same permission applies to all other topics in the request.
This pattern breaks the principle of object-level access control, allowing a user with legitimate permissions on one resource to perform actions on unrelated resources they should not control.
Potential impact
- Moderators may lock or unlock topics in forums they are not assigned to.
- Moderators could delete topics belonging to other forums, causing data loss.
- Moderators can hide or unhide posts and topics, affecting content visibility and moderation integrity.
- Forum structure and policy enforcement may be undermined, eroding trust in the moderation model.
General mitigation guidance
Effective mitigation centers on enforcing object-level authorization checks for every resource in bulk operations.
Common defensive patterns include:
- Validating permissions individually for each topic ID in a batch request, rather than relying on a single anchor object.
- Designing APIs so that bulk actions operate only on server-side query results constrained by current user permissions, instead of arbitrary client-supplied IDs.
- Applying least-privilege principles to moderator roles, ensuring their actions are scoped to specific forums or resource sets.
- Treating all client-supplied identifiers as untrusted and subjecting them to rigorous access control checks before performing state-changing operations.
How teams detect issues like this
Detection typically focuses on identifying missing or inconsistent authorization checks around resource-level actions:
- Static analysis rules that flag bulk operations where permission checks are performed once but applied to collections of IDs.
- Code review practices that require explicit per-object authorization checks in loops or batch handlers, especially around moderation or administrative endpoints.
- Logging and monitoring of moderation actions, looking for anomalies such as moderators affecting topics outside their assigned forums.
- Policy-based enforcement in automated review tools to prevent merging changes that bypass established access control middleware or decorators.

