Summary
Devtron's Attributes API exposes the global API token signing key to any authenticated user via the /orchestrator/attributes?key=apiTokenSecret endpoint without proper authorization checks.
With this key, an attacker can forge valid JWTs for arbitrary users offline, potentially gaining full control over the Devtron platform and enabling lateral movement into the underlying Kubernetes cluster.
Affected context
This vulnerability occurs in Devtron instances (version 2.0.0 and prior) where:
- The Attributes API is reachable to general authenticated users (including low-privileged CI/CD developers).
- The global API token signing key is stored as an attribute accessible through the
/orchestrator/attributesinterface. - JWT-based authentication relies on a single, shared signing key for generating and validating API tokens.
In such environments, the lack of fine-grained access control around sensitive attributes exposes critical cryptographic material to users who should never have access to it.
Exploit preconditions
- Attack surface: Devtron HTTP(S) API, specifically the
/orchestrator/attributesendpoint. - Required access: Any valid authenticated Devtron account, including low-privileged or CI/CD-focused roles.
- Trigger point: An HTTP request to
/orchestrator/attributes?key=apiTokenSecretthat returns the global JWT signing key. - Why exploitation is possible: The Attributes API returns highly sensitive configuration values without enforcing a proper authorization policy, allowing users outside of administrative roles to access cryptographic secrets used to sign and validate JWTs.
Why this happens
The core issue is a missing authorization check (CWE-862) on a highly sensitive API path that exposes the global API token signing key.
The Attributes API treats the apiTokenSecret attribute like any other configuration value, returning it to any authenticated caller without verifying whether that caller is authorized to access cryptographic material or platform-wide secrets.
Architecturally, this reflects an insecure access-control design where:
- Secret-bearing attributes are not segregated from non-sensitive configuration.
- Roles and permissions are not enforced at the resource or field level.
- The principle of least privilege is not applied to the retrieval of authentication and signing keys.
As a result, the signing key becomes effectively public within the set of authenticated users, enabling offline JWT forgery and privilege escalation.
Potential impact
- Attackers can forge valid JWT tokens for arbitrary Devtron user identities.
- Complete takeover of the Devtron web interface and API under any existing or fabricated account.
- Escalation from low-privileged CI/CD roles to full administrative control within Devtron.
- Unauthorized configuration changes to CI/CD pipelines, deployments, and environment settings.
- Abuse of Devtron's cluster integration to perform lateral movement into the connected Kubernetes cluster.
- Potential deployment of malicious workloads, secrets exfiltration, or tampering with production deployments via compromised Devtron control.
General mitigation guidance
Effective mitigation focuses on enforcing strict access control for sensitive attributes and protecting cryptographic keys:
- Apply explicit authorization checks on all endpoints that return secrets, API keys, signing keys, or similar high-value attributes; ensure only narrowly defined administrative roles can access them.
- Separate sensitive attributes (e.g., signing keys, passwords, tokens) from general configuration, using different storage mechanisms, APIs, or access layers that are locked down by default.
- Implement the principle of least privilege at the API layer, granting read access to attributes only when a business need and appropriate role are clearly established.
- Avoid exposing raw signing keys to application users or automation where possible; instead, provide higher-level token issuance workflows that never reveal the underlying key material.
- Use key rotation strategies so that if a signing key is ever exposed, it can be quickly replaced without long-lived impact.
- Centralize secrets management using established secret stores or key management systems, and enforce consistent access policies across services.
How teams detect issues like this
Organizations can identify and monitor this class of issue through a combination of code-centric and operational approaches:
- Static analysis and code review:
- Flag internal APIs that expose configuration or attribute values and require explicit authorization guards.
- Search for endpoints that return secrets, keys, tokens, or passwords and verify role-based access controls are applied.
- Enforce patterns such as "no direct secret reads from public or low-trust endpoints" in secure coding guidelines.
- Security testing:
- Include privilege-escalation and horizontal-access tests in API security assessments, verifying low-privileged accounts cannot access sensitive attributes or cryptographic material.
- Use automated API scanners and fuzzers configured with multiple roles to detect inconsistent access-control behavior.
- Runtime monitoring:
- Log access to sensitive attributes or secret-retrieval endpoints and alert on unusual patterns, such as low-privileged accounts requesting signing keys.
- Apply API gateway or WAF rules that restrict access to sensitive paths to specific roles, networks, or service identities.
- Governance and policy:
- Adopt policies requiring threat modeling for any feature that handles secrets or authentication infrastructure.
- Integrate security checks into CI/CD pipelines to ensure access-control annotations or middleware are present on sensitive routes.

