Summary
Arcane's project file handling allows an authenticated user to abuse Docker Compose include directives to read arbitrary files from the server filesystem before path validation occurs.
By creating a project with a crafted include path, an attacker can access sensitive files such as the Arcane SQLite database, potentially escalating to administrative control and remote code execution via Arcane's Docker control plane.
Affected context
This vulnerability affects Arcane deployments that:
- Allow authenticated users to create or import projects with custom Docker Compose content
- Persist project compose files to disk without validating
includepaths at write time - Expose an API (e.g.,
ProjectService.GetProjectFileContent) that resolves and returns included file content - Run the backend process with filesystem access to sensitive files such as
/etc/passwdand Arcane's own SQLite database (/app/data/arcane.db)
Environments where the Arcane backend runs with elevated or broad host filesystem permissions are at greater risk, as more sensitive data becomes accessible through the traversal.
Exploit preconditions
- Attack surface: Arcane backend API, specifically project creation and project file content retrieval endpoints.
- Required access: Valid authenticated user account capable of creating projects and invoking the project file API (no need for administrative privileges).
- Trigger point: Submission of a project compose file containing malicious
includedirectives with path traversal sequences (e.g.,../../..) followed by requesting that project's file content through the API. - Why exploitation is possible:
ProjectService.CreateProjectwrites attacker-controlled compose files to disk without validatingincludepaths.ProjectService.GetProjectFileContentresolves and returns include targets before running any path traversal validation.- The backend reads files directly from the filesystem based on the include path, allowing attackers to escape the intended project directory and access arbitrary readable files.
Why this happens
The core issue is improper restriction of file path resolution when processing Docker Compose include directives.
Instead of normalizing and validating include paths against an allowed base directory before reading, the implementation:
- Accepts untrusted compose content from authenticated users.
- Persists this content without constraining or sanitizing
includepaths. - Resolves and reads included files during
GetProjectFileContentbefore any path traversal checks.
This maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where user-controllable paths are used in filesystem operations without sufficient canonicalization and enforcement of directory boundaries. The vulnerable pattern is the assumption that relative paths in include directives will remain within the project scope, without hard guarantees enforced in code.
Potential impact
- Read of arbitrary files accessible to the Arcane backend process, including:
- System files such as
/etc/passwd - Application data such as
/app/data/arcane.db(containing user password hashes and API keys) - Disclosure of user credentials (hashes) and API keys, enabling:
- Escalation from a low-privileged user to an Arcane administrator
- Impersonation of other users and automation via stolen API keys
- Full compromise of the Arcane management plane, allowing:
- Malicious manipulation of Docker containers, images, networks, and volumes
- Potential remote code execution on the host through Arcane's Docker control capabilities
- Broader data exfiltration from the host where Arcane runs, limited only by the backend process's filesystem permissions.
General mitigation guidance
Effective mitigation centers on treating all filesystem paths derived from user input—including those embedded in configuration files—as untrusted and strictly constrained.
Common defensive patterns include:
- Enforce allowed roots for includes:
- Resolve all include paths to their canonical (absolute) form.
- Reject any include whose resolved path falls outside a predetermined project directory or allowed include directory.
- Validate before use, both on write and read:
- During project creation/import, parse compose content and validate
includeentries before persisting it. - During any file retrieval or content rendering, validate the resolved path again before reading.
- Normalize and sanitize paths:
- Canonicalize paths (resolving
.., symlinks, and relative components) before comparison. - Avoid direct concatenation of user-controlled segments into filesystem paths.
- Apply least privilege to the backend process:
- Run Arcane with the minimum filesystem privileges practical, limiting its ability to read sensitive host files.
- Separate application data (e.g.,
arcane.db) into directories that are protected and not directly reachable through user-influenced path resolution. - Constrain configuration-driven file access:
- Treat configuration directives like
includeas high-risk input. - Consider whitelisting patterns or explicit file lists instead of arbitrary paths.
How teams detect issues like this
Organizations can identify and monitor this class of vulnerability via several complementary approaches:
- Static analysis and code scanning:
- Search for filesystem operations (e.g.,
open,readFile,os.ReadFile, etc.) that use values derived from HTTP request bodies, query parameters, or configuration fields without canonicalization and bounds checking. - Flag code paths where
includeor similar directives are parsed and used to construct paths without verifying they remain under a known root directory. - Targeted code review:
- Examine services that handle project creation, import, or configuration parsing, focusing on any logic that reads files based on project-specific paths.
- Look for patterns where path validation or normalization happens after the file read, or only in some code paths.
- Policy and architectural checks:
- Enforce internal guidelines that all file access influenced by user input must:
- Normalize paths.
- Compare against an enforced base directory.
- Reject or log attempts to traverse outside the allowed scope.
- Runtime monitoring and logging:
- Log resolved file paths requested via project or configuration APIs.
- Alert on patterns that include
..segments, absolute paths, or sensitive directories (e.g.,/etc,/app/data), which may indicate exploitation attempts.
Automated security tools and CI pipelines can be configured to detect these patterns early by combining static checks with policy-based reviews of path-handling code.

