Summary
Arcane versions prior to 1.19.2 expose a system-wide environment variables endpoint without enforcing admin-level authorization.
Any authenticated non-admin user can overwrite the global .env.global file, influencing every project's Docker Compose deployment and potentially enabling supply-chain compromise, data exfiltration, or widespread service disruption.
Affected context
This vulnerability affects Arcane deployments where:
- The
/api/environments/{id}/templates/variablesendpoint is enabled and reachable to regular authenticated users - The
.env.globalfile is used for variable substitution across multiple Docker Compose projects - Projects rely on shared environment variables for critical configuration values such as image registries, database URLs, or secret keys
In such environments, a non-admin user who can authenticate to Arcane can influence configuration that other users implicitly trust in their project definitions.
Exploit preconditions
- Attack surface: Arcane HTTP API (
PUT /api/environments/{id}/templates/variables) - Required access: Any authenticated non-admin account with a bearer token or API key
- Trigger point: Sending a crafted PUT request that updates
.env.globalvalues referenced in other users' compose files - Why exploitation is possible: The endpoint that controls global environment variables lacks an admin authorization check, allowing lower-privileged users to perform a configuration operation intended only for administrators
Why this happens
The core issue is a missing authorization control on an endpoint that modifies highly sensitive, system-wide configuration.
Arcane exposes /api/environments/{id}/templates/variables to authenticated users but does not verify that the caller has administrative privileges before allowing writes to .env.global.
This maps to CWE-862: Missing Authorization, where the application fails to enforce permission checks on a critical function, effectively granting non-admin users the ability to alter configuration that affects all projects.
At a design level, privileged configuration operations share the same access level as routine user actions, rather than being isolated behind a stricter authorization policy.
Potential impact
- Attackers may redirect container image pulls to attacker-controlled registries by overriding variables such as
REGISTRYorIMAGE - Attackers could introduce malicious images, leading to remote code execution on the Docker host during deployments
- Global overrides of
DATABASE_URLand related settings could enable credential exfiltration or unintended database access paths - Disruption or outage across many or all projects by corrupting essential environment variables used at deployment time
- Undermining integrity of CI/CD pipelines and deployment workflows that rely on trusted global environment configuration
General mitigation guidance
Effective mitigation focuses on enforcing strict authorization boundaries and reducing the blast radius of shared configuration:
- Ensure that endpoints which modify system-wide configuration are restricted to clearly defined admin roles, with explicit authorization checks on every write operation
- Separate per-project configuration from truly global configuration to limit the impact of compromised accounts
- Apply least-privilege principles to API keys and bearer tokens, granting only the minimal capabilities required for project-level operations
- Introduce configuration change controls, such as approval workflows or mandatory reviews, for modifications to environment templates that affect multiple projects
- Where possible, avoid relying solely on a single global environment file for critical secrets or registry configuration; use scoped secrets management systems designed for multi-tenant isolation
How teams detect issues like this
Organizations can detect and monitor this class of issue using a combination of code-centric and operational approaches:
- Code review patterns: Flag any API routes that mutate shared or global configuration and verify they consistently enforce admin or elevated-role checks
- Static analysis: Use rules to identify controller or handler methods that bypass authorization middleware or omit role checks while performing sensitive operations
- Access logs and telemetry: Monitor for unusual patterns of calls to
/api/environments/*/templates/variables, especially from non-admin accounts or service tokens - Policy enforcement: Implement automated checks in CI/CD to ensure that critical endpoints are annotated with required authorization attributes or decorators
- Configuration drift monitoring: Track and alert on unexpected changes to
.env.globaland other shared configuration artifacts, correlating changes to specific user identities or API keys

