Summary
Arcane's Huma backend exposed four unauthenticated GET endpoints under /api/templates* that allowed any network client to list and read full Compose YAML and .env content for all custom templates.
Because operators often save real environment configurations as templates, including database passwords and API keys, this missing authorization effectively exposed sensitive secrets to anyone who could reach the Arcane instance.
Affected context
This vulnerability appears in Arcane deployments where:
- The Huma backend is reachable over the network (e.g., within a corporate LAN or exposed via reverse proxy/VPN).
- Operators use the "Save as Template" flow on project or swarm-stack creation pages, storing real
.envand Compose YAML content as reusable templates. - The default or existing configuration does not place compensating controls (e.g., network segmentation, reverse-proxy auth) in front of the
/api/templates*endpoints.
In this context, the backend treated these GET endpoints as publicly accessible, even though the frontend and other HTTP verbs on the same paths required authentication.
Exploit preconditions
- Attack surface: HTTP(S) endpoints exposed by the Arcane Huma backend.
- Required access: Any unauthenticated network access to the Arcane instance (no credentials or API keys needed).
- Trigger point: Sending GET requests to the affected
/api/templates*endpoints. - Why exploitation is possible: The backend route definitions for these GET endpoints lack an authorization requirement, creating an inconsistency with the rest of the CRUD operations that enforce Bearer/API key checks. As a result, the application serves template YAML and
.envcontent to any client, regardless of identity.
Why this happens
The underlying bug is a missing authorization check on specific HTTP routes, aligning with CWE-862: Missing Authorization.
While the product conceptually treats /customize/templates/* as a protected area, only POST/PUT/DELETE handlers enforce authentication and authorization.
The GET handlers for listing and retrieving templates were registered without equivalent security requirements, leading to a divergence between intended and actual access control.
This is a classic case where route-level protection is inconsistently applied, leaving read operations exposed even though write operations are locked down.
Potential impact
- Exposure of database passwords, API keys, and other secrets stored in
.envfiles. - Disclosure of internal service topology, credentials, and network configuration from Compose YAML templates.
- Facilitation of further attacks such as lateral movement, database compromise, or service impersonation using leaked secrets.
- Undermining of segmentation and zero-trust assumptions if attackers can reuse environment data to pivot to other systems.
General mitigation guidance
Effective mitigation focuses on consistent, least-privilege access control for all routes that handle sensitive material:
- Apply the same authentication and authorization requirements to read (GET) endpoints as to write (POST/PUT/DELETE) endpoints in the same resource family.
- Treat any endpoint capable of returning environment files or configuration (e.g.,
.env, Compose YAML) as handling secrets by default, and restrict access accordingly. - Centralize route protection logic (e.g., middleware or policy filters) instead of repeating checks per handler to avoid gaps.
- Limit what gets persisted as templates by default; avoid storing raw secrets where possible, or isolate them behind separate secret management mechanisms.
- Use defense-in-depth through network segmentation, reverse-proxy authentication, and service-level access controls so that backend APIs are not directly reachable from untrusted networks.
How teams detect issues like this
Organizations can detect similar issues through:
- Static analysis and code review patterns that flag route registrations lacking authentication middleware or security policies, especially for resources related to configuration or templates.
- API contract or OpenAPI/Swagger reviews that verify security schemes are attached to every operation, not just write actions.
- Automated tests that attempt unauthenticated access to all routes in protected namespaces (e.g.,
/api/templates*) and fail builds when protected endpoints respond successfully. - Runtime monitoring and logging to detect unusual unauthenticated access to endpoints returning large configuration payloads or environment-like data.

