Summary
ArcadeDB fails to carry an authenticated user's security context into asynchronous command workers. A user with read access to one database may submit an asynchronous JavaScript command that bypasses scripting authorization, execute unrestricted host-accessible code, and create a server-wide administrator.
Affected context
The vulnerability occurs in ArcadeDB server deployments that expose the HTTP command API and permit users with limited database access to submit asynchronous commands. The risk is present when commands use asynchronous execution and the worker thread's database context does not retain the authenticated principal, causing authorization checks for scripting operations to be ineffective.
Exploit preconditions
- Attack surface: The
/api/v1/commandHTTP endpoint - Required access: Authenticated access with limited read privileges to at least one database
- Trigger point: Submission of a command with asynchronous response handling enabled and JavaScript execution selected
- Why exploitation is possible: The asynchronous worker lacks the submitting user's principal, so scripting authorization becomes a no-op and host-accessible code can run without the expected privilege checks
Why this happens
The underlying bug is a failure to propagate authentication state across an asynchronous execution boundary. Because the worker's DatabaseContext has no bound user, authorization logic that depends on the authenticated principal cannot enforce the caller's permissions. This represents CWE-269: Improper Privilege Management, where privileged operations become available because security context and authorization checks are not consistently preserved.
Potential impact
- A limited database user may create a server-wide administrator
- An attacker could gain full administrative control of the ArcadeDB server
- Database contents and security configuration could be modified or deleted
- Additional users, permissions, or persistence mechanisms could be created
- Connected applications and data sources may be exposed or disrupted
General mitigation guidance
Mitigation generally focuses on preserving authorization context across asynchronous execution and reducing the capabilities of scripting interfaces.
Common defensive patterns include:
- Propagating the authenticated principal and complete security context to every worker handling a request
- Failing closed when an asynchronous context has no authenticated identity
- Applying authorization checks at the execution boundary rather than relying only on request submission checks
- Restricting or disabling server-side scripting for untrusted or low-privilege users
- Removing unrestricted host access from embedded scripting environments
- Separating database-level permissions from server-wide administrative capabilities
- Running the service with least-privilege operating-system and database permissions
These controls reduce the likelihood that a context-propagation error becomes a complete administrative compromise.
How teams detect issues like this
Organizations can look for this weakness through:
- Static analysis of asynchronous task creation, thread pools, and request-context propagation
- Code review checks verifying that principals, sessions, and authorization state survive worker handoffs
- Tests that execute privileged and scripting operations through both synchronous and asynchronous paths
- Monitoring for asynchronous command requests, JavaScript execution, unexpected user creation, and privilege changes
- Policy enforcement that restricts scripting endpoints and requires explicit authorization for server-wide security operations
Automated security testing and code review tools can help identify missing fail-closed behavior and inconsistent authorization checks.

