Summary
A critical privilege-management flaw in ArcadeDB allows authenticated readers to bypass scripting authorization checks when JavaScript commands are processed by the gRPC transaction executor.
Under affected transaction-handling conditions, an attacker may execute unrestricted JavaScript and create server-wide administrator accounts.
Affected context
The vulnerability occurs in ArcadeDB deployments where authenticated reader-level users can access the gRPC transaction functionality and invoke command execution through a transaction. The risk arises when the transaction executor runs on a thread that does not retain the authenticated principal, causing authorization checks for scripting operations to be evaluated without the correct user identity.
Exploit preconditions
- Attack surface: ArcadeDB gRPC transaction and command-execution functionality
- Required access: Valid authenticated access with reader-level privileges
- Trigger point: Transaction execution involving a command that invokes JavaScript processing
- Why exploitation is possible: The authenticated principal is not bound to the transaction executor thread, allowing scripting authorization checks to be bypassed
Why this happens
The underlying bug is a failure to preserve security context across asynchronous or delegated transaction execution.
In beginTransaction, the gRPC transaction executor thread does not retain the authenticated principal associated with the request. As a result, authorization logic for JavaScript execution may evaluate the operation without the originating user's privileges, violating least-privilege expectations. This behavior maps to CWE-269: Improper Privilege Management, because a lower-privileged principal can reach functionality intended for more privileged users.
Potential impact
- An authenticated reader may execute unauthorized JavaScript commands
- Attackers could create server-wide administrator accounts
- Database contents and security settings may be modified
- Administrative control of the ArcadeDB instance could be obtained
- Connected applications and stored data may be exposed or altered
General mitigation guidance
Mitigation generally focuses on preserving identity and authorization context across all transaction execution paths.
Common defensive patterns include:
- Binding the authenticated principal to worker, executor, and transaction threads
- Performing authorization checks at the point of command execution rather than relying only on request-entry checks
- Denying scripting capabilities by default for roles that do not explicitly require them
- Separating administrative account-management operations from general database command execution
- Applying least-privilege roles and restricting access to gRPC transaction interfaces
- Auditing account creation, privilege changes, script execution, and transaction commands
- Treating transaction identifiers as untrusted references and enforcing ownership and authorization checks
How teams detect issues like this
Detection approaches can include:
- Static analysis for transaction or executor code that accesses security context without explicit principal propagation
- Code review checks for authorization decisions made on worker threads or in asynchronous callbacks
- Tests that verify reader, writer, and administrator permissions remain consistent across transaction boundaries
- Policy enforcement requiring authorization checks for scripting and account-management operations
- Runtime monitoring for unexpected JavaScript execution, administrator creation, or privilege changes by reader-level accounts
- Automated security testing that exercises gRPC transaction workflows with multiple role identities

