Summary
Arcane's environment proxy middleware forwarded certain /api/environments/{id}/... requests to remote environment agents without enforcing authentication first.
When the environment ID pointed to a remote environment, the proxy attached a valid manager-held agent token even for unauthenticated callers, allowing direct access to remote containers, logs, and other agent operations.
Affected context
This vulnerability affects Arcane deployments that manage one or more remote environments via agents and expose the Arcane HTTP API.
Specifically, it occurs when:
- Remote environments are reachable through the manager's environment proxy middleware
- The API path pattern
/api/environments/{id}/...is used to access remote resources - Authentication is expected to be enforced globally, but proxy logic evaluates environment routing before auth checks
The issue does not depend on any particular container runtime configuration on the remote hosts, only on the presence of Arcane's agents and manager.
Exploit preconditions
- Attack surface: Arcane HTTP(S) API endpoint exposed on the network (LAN or Internet).
- Required access: Network connectivity to the Arcane manager; no valid user credentials required.
- Trigger point: Any HTTP request to paths matching
/api/environments/{remote-id}/...targeting a non-local (remote) environment. - Why exploitation is possible: The environment proxy middleware decides to forward the request to a remote agent before authentication is enforced and automatically appends the manager-held agent token, effectively authenticating the attacker's request to the agent.
Why this happens
The core issue is a missing authentication check on a security-sensitive endpoint, mapped to CWE-306: Missing Authentication for Critical Function.
The request routing logic in the environment proxy middleware performs the following insecure pattern:
- It inspects the environment ID to determine whether the request targets a local or remote environment.
- For remote environments, it immediately proxies the request to the corresponding agent and injects the manager's agent token.
- Authentication and authorization checks occur after this proxy decision, meaning unauthenticated requests are treated as trusted when reaching the remote agent.
This inversion of responsibility—routing and credential injection preceding access control—creates an implicit trust path that bypasses the intended authentication layer.
Potential impact
- Unauthenticated listing of containers and services in remote environments.
- Reading sensitive data from container logs or other agent-backed endpoints.
- Performing unauthorized management operations on remote environments (e.g., starting, stopping, or removing containers, images, networks, or volumes) where exposed via the agent.
- Service disruption by stopping or reconfiguring workloads in remote environments.
- Potential pivoting into broader infrastructure via compromised containers or services.
General mitigation guidance
Effective mitigation focuses on enforcing authentication and authorization before any proxying or credential injection occurs:
- Ensure that all environment-related API routes, especially
/api/environments/{id}/..., are protected by mandatory authentication middleware that runs before routing or proxy logic. - Design proxy middleware to assume requests are untrusted by default and require upstream security context (authenticated user identity and roles) before attaching internal tokens or forwarding to agents.
- Apply least-privilege to agent tokens and internal credentials used for remote environments, limiting the scope of actions they can perform and segregating environments where feasible.
- Introduce defense-in-depth access controls at the remote agent side (e.g., verifying the caller identity or enforcing additional checks beyond a single bearer token).
- Restrict external exposure of the Arcane API with network-layer controls such as VPNs, IP allowlists, or API gateways that enforce authentication.
How teams detect issues like this
Detection can rely on a combination of code-level and operational signals:
- Code review and static analysis:
- Search for routes under
/api/environments/{id}/...that perform proxying or request forwarding. - Flag middleware that injects credentials (tokens, API keys) prior to verifying authentication and authorization.
- Enforce architectural policies where authentication middleware must be at the top of the handler chain for all externally reachable routes.
- Configuration and policy checks:
- Use API gateway or service mesh policies to require authentication on all environment management endpoints.
- Validate that anonymous or guest roles have no access to management APIs.
- Runtime monitoring:
- Monitor Arcane API access logs for unauthenticated requests to
/api/environments/{id}/...paths and correlate with actions taken by remote agents. - Alert on anomalous environment operations originating from IP ranges or user agents that typically do not manage infrastructure.
Automated security tooling (SAST, API security scanners, or gateway rule validators) can help identify routes where authentication is skipped or applied conditionally.

