Summary
ArcadeDB has an authorization bypass in the batch API when a request opens a closed database on demand. An authenticated user may be able to read or write database types they are not authorized to access when making the first batch request.
Affected context
The issue affects ArcadeDB deployments where the batch API can open a closed database on demand. The described bypass occurs on the first POST /api/v1/batch/{database} request to that database, when per-type access controls are not properly applied during the open-on-demand flow.
Exploit preconditions
- Attack surface: The ArcadeDB batch API endpoint for a database
- Required access: An authenticated account; the user need not be authorized for the affected types
- Trigger point: The first batch request to a database that is closed and opened on demand
- Why exploitation is possible: The on-demand database-opening path can skip per-type ACL checks, allowing operations beyond the user's assigned permissions
Why this happens
The authorization flow does not consistently enforce per-type access control when a database is opened on demand through the batch API. This is an authorization enforcement failure that maps to CWE-863: Incorrect Authorization: a request from an authenticated user is not adequately checked against the permissions required for the requested types and operations.
Potential impact
- An authenticated user could read data from types they are not authorized to access.
- An authenticated user could modify data in types beyond their assigned permissions.
- Unauthorized changes could affect the integrity or availability of application data.
General mitigation guidance
Defensive patterns focus on making authorization checks consistent across database lifecycle and request paths.
- Enforce per-type authorization for every operation, including when a database is opened on demand.
- Apply authorization checks at the point of access rather than relying only on authentication or earlier checks.
- Use deny-by-default behavior when permissions are missing, ambiguous, or cannot be evaluated.
- Limit database and application identities to the minimum permissions required.
- Validate requested operations and resource types against the authenticated user's current permissions.
How teams detect issues like this
- Review batch API and database-opening code paths for authorization checks that differ from standard access paths.
- Use static analysis or code review rules to flag resource access that occurs before permission checks or bypasses shared authorization middleware.
- Test requests against closed and already-open databases using accounts with restricted per-type permissions.
- Monitor audit logs for batch operations that access types outside a user's expected authorization scope.
- Apply policy checks in CI to require authorization enforcement on all database and resource access paths.

