Summary
A broken authorization flaw in Backpack CRUD allows authenticated users to perform update, delete, or reorder operations on records outside the scope defined by tenant, ownership, or other row-level access-control clauses. The issue becomes risky when an attacker can identify or guess an out-of-scope record's primary key and the application relies on CRUD query clauses for authorization.
Affected context
The vulnerability can occur in Backpack CRUD applications that use addClause(), addBaseClause(), or equivalent scoped model queries to restrict which records an authenticated user may access. It affects Update, Delete, and Reorder operations when those actions resolve records through an unscoped model query rather than the query used for listing and reading records. Applications that enforce authorization independently of CRUD query clauses may not be affected by this specific issue.
Exploit preconditions
- Attack surface: Authenticated Backpack CRUD endpoints for update, delete, or reorder operations
- Required access: A valid user account with access to the affected CRUD interface
- Trigger point: Supplying the primary key of a record to a write operation
- Why exploitation is possible: The write operation may resolve the target through an unscoped query, bypassing tenant, ownership, or other row-level restrictions
Why this happens
The underlying bug is an authorization scope mismatch. Read and list operations use the configured CRUD query, while write operations resolve records from the model without preserving those constraints. This maps primarily to CWE-639, Authorization Bypass Through User-Controlled Key, and also relates to CWE-863, Incorrect Authorization, because access decisions are not consistently enforced at the point where the record is modified.
Potential impact
- An authenticated user may modify records belonging to another tenant or owner
- An attacker could delete records outside their authorized scope
- Unauthorized reordering could alter workflow, presentation, or priority data
- Data integrity and tenant isolation could be weakened
- Repeated abuse could cause service disruption or administrative data loss
General mitigation guidance
Mitigation generally focuses on making every record-fetching path enforce the same authorization scope. Write operations should use scoped queries or explicit policy checks rather than resolving objects from an unrestricted model query. Authorization should be enforced server-side, independently of client-supplied identifiers, with secure-by-default deny behavior, strict tenant and ownership constraints, and least-privilege roles. Applications should also avoid treating hidden identifiers as security controls and should use corrected, vendor-maintained component releases through their normal dependency-management process.
How teams detect issues like this
Detection can include static analysis and code review checks for update, delete, or reorder handlers that call unrestricted model lookups after receiving client-controlled identifiers. Reviewers can compare authorization behavior across list, read, and write paths and verify that tenant or ownership clauses are preserved. Dynamic testing should attempt operations against records outside the authenticated user's scope, while policy enforcement can require centralized authorization checks and regression tests for cross-tenant access. Automated code review tools may help identify inconsistent query scoping.

