Summary
Arcane's huma-based REST API exposes several Git repository management endpoints that do not enforce admin-level authorization, allowing any authenticated user to manage GitOps repository configurations.
Under these conditions, a non-admin user can repoint repositories to attacker-controlled hosts and trigger actions that cause Arcane to exfiltrate stored Git credentials in plaintext over HTTP Basic or SSH authentication.
Affected context
This vulnerability affects Arcane deployments that:
- Expose the huma-based REST API endpoints under
/api/customize/git-repositoriesand/api/git-repositories/sync - Use GitOps-style repository configurations with stored PATs, SSH keys, or similar credentials
- Rely on role-based separation where only admins are supposed to manage infrastructure-level Git repositories
In such setups, any authenticated user with the default non-admin role can interact with certain Git repository endpoints without the expected admin check.
Exploit preconditions
- Attack surface: Arcane's authenticated REST API, specifically:
/api/customize/git-repositories/*/api/git-repositories/sync/*- Required access: Any valid Arcane user account (default user role is sufficient); no admin role required.
- Trigger points:
- Calling list/create/get/update/delete/test/listBranches/browseFiles on Git repository resources
- Updating an existing repository configuration to point to an attacker-controlled host while leaving stored credentials unchanged
- Invoking subsequent test/branches/files operations that cause Arcane to contact the configured repository URL
- Why exploitation is possible:
- Eight Git repository endpoints never invoke the
checkAdmin(ctx)helper that protects other admin-managed resources. - The huma authentication middleware enforces only authentication, not authorization by role.
- The update logic preserves stored PAT/SSH credentials unless new ones are explicitly supplied, so Arcane continues to use and transmit the original secrets to the new, attacker-controlled endpoint.
Why this happens
The core defect is a missing authorization check on a sensitive set of endpoints. While Arcane has a consistent pattern of using checkAdmin(ctx) to guard admin-managed resources (such as registries, environments, users, API keys, swarm, settings, and system configuration), the Git repository management routes are an exception: they only rely on authentication middleware that ensures the caller is logged in but does not enforce the admin role.
This maps directly to CWE-862: Missing Authorization, where a system fails to verify that a user is permitted to perform an action on a resource. The additional logic that preserves existing credentials during update operations, combined with implicit reuse of those secrets when testing or browsing repositories, creates a channel where unauthorized users can indirectly cause the application to present stored credentials to attacker-controlled infrastructure.
Potential impact
- Unauthorized listing, creation, modification, and deletion of Git repository configurations
- Exfiltration of plaintext Git credentials (PATs or SSH keys) via connections initiated by Arcane to attacker-controlled hosts
- Compromise of private Git repositories, including source code, infrastructure-as-code, and deployment manifests
- Tampering with GitOps sources, potentially leading to malicious deployments, backdoors, or configuration drift
- Escalation of access beyond the Arcane account's intended permissions by leveraging stolen Git credentials in other systems
General mitigation guidance
Mitigation revolves around enforcing consistent authorization checks for all sensitive configuration APIs and minimizing how secrets are handled in backend workflows.
Recommended defensive patterns include:
- Applying a centralized, role-aware authorization layer that is invoked by default for every administrative or configuration endpoint, with explicit opt-out rather than opt-in behavior.
- Treating Git repository configurations and stored credentials as administrative resources, requiring an admin or equivalent privileged role for all create, update, delete, and test operations.
- Designing update handlers so that any operation affecting endpoints used for outbound authentication is subject to strict permission checks, and ensuring that secret reuse cannot be indirectly redirected to attacker-controlled hosts.
- Separating repository connectivity "test" operations from configuration write operations and gating them behind the same authorization controls as secret management.
- Limiting where and how long plaintext credentials are used or kept in memory, and constraining outbound network access from Arcane to known, vetted Git hosts or network egress policies where feasible.
- Applying least-privilege principles to Git credentials themselves (scoped PATs, restricted SSH keys) so that any exfiltrated secret yields minimal access.
How teams detect issues like this
Detection efforts can focus on both code-level authorization gaps and runtime anomalies:
- Static analysis and code review:
- Search for controller or handler functions under Git repository management routes that are missing calls to centralized authorization helpers such as
checkAdmin(ctx)or equivalent. - Define linting or static analysis rules to flag any new handler that exposes configuration or credentials without an explicit role check.
- Review route registration and middleware wiring to ensure that authentication middleware is complemented by authorization checks for privileged operations.
- Policy and configuration enforcement:
- Implement service-level policies that require admin-level authorization for endpoints that interact with secrets, external connectors, or infrastructure definitions.
- Use API gateways or reverse proxies to enforce role-based access control where application-level enforcement is incomplete.
- Runtime monitoring:
- Monitor logs for patterns where non-admin users repeatedly call Git repository management endpoints, especially
update,test,listBranches, andbrowseFiles. - Alert on outbound connections from Arcane to unrecognized or non-approved Git hosts, which may indicate credential exfiltration attempts.
- Automated code review and security scanning tools can be configured to highlight authorization discrepancies between similar resource classes (e.g., comparing container registry routes with Git repository routes).

