Summary
ArcadeDB's IMPORT DATABASE statement could let an authenticated user with SQL command access make server-side requests to internal HTTP or HTTPS services and read local files through file:// destinations. Imported content could become queryable records, while XML entity processing could also enable entity expansion and related resource access.
Affected context
The issue occurs in ArcadeDB deployments where an authenticated user can submit SQL through the /api/v1/command or /api/v1/query endpoints and invoke IMPORT DATABASE. Before the security controls are applied, import sources may be passed to source discovery without sufficient destination validation. The root-only /api/v1/server administration endpoint is not part of the affected access path.
Exploit preconditions
- Attack surface: SQL import functionality exposed through the command or query API
- Required access: An authenticated account with SQL command access; administrative authorization was not previously required for this statement
- Trigger point: Processing an
IMPORT DATABASEsource, including HTTP, HTTPS, or file-based destinations - Why exploitation is possible: Import sources were accepted without adequate validation, allowing the server process to initiate outbound requests or access readable local paths
- Additional condition: XML imports may process DTDs and external entities, creating an additional entity-expansion and external-resource risk
Why this happens
The underlying flaw combines insufficient authorization with inadequate validation of user-controlled import destinations. The database import path trusted a supplied source and allowed the server to resolve network and local-file schemes in its own execution context. This maps primarily to CWE-918: Server-Side Request Forgery, because attacker-influenced destinations cause server-side requests, and also relates to CWE-22: Path Traversal when local paths are exposed and CWE-776: Improper Restriction of Recursive Entity References in DTDs when XML entity expansion is permitted.
Potential impact
- The server may make requests to internal services that are not externally reachable
- Sensitive files readable by the database process could be disclosed or ingested as records
- Imported content could expose credentials, configuration data, or internal service responses
- XML entity expansion could consume excessive resources or access external entities
- Attackers could gain information useful for lateral movement or further compromise
General mitigation guidance
Mitigation generally focuses on enforcing authorization, reducing destination trust, and disabling dangerous parser behavior.
Common defensive patterns include:
- Require an explicit administrative permission, such as
updateSecurity, before allowing database imports - Block local-network and link-local destinations by default
- Use a narrowly scoped allow-list for permitted local import paths
- Restrict outbound network access from database processes through network policy or egress controls
- Permit only required URI schemes and validate destinations before resolution
- Disable XML DTD processing and external entities, using hardened XML parser settings
- Run the database process with least-privilege filesystem and network permissions
- Treat imported data as untrusted and apply strict format and schema validation
How teams detect issues like this
Detection approaches can include:
- Static analysis and code review for import APIs that accept user-controlled URIs or filesystem paths
- Searches for unrestricted handling of
http://,https://, andfile://sources - Review of authorization checks around database import statements and API routes
- XML parser configuration checks for enabled DTDs, external entities, or unrestricted entity expansion
- Monitoring database processes for unexpected outbound connections to private, loopback, or link-local addresses
- Auditing import activity for unusual local paths, internal destinations, or unexpectedly large XML expansions
- Policy enforcement that requires destination allow-lists and restricted egress for database workloads

