Summary
A missing authorization check in cert-manager's ACME Challenge handling lets namespace users create attacker-controlled Challenge resources not bound to an Order or Issuer-selected solver.
Under these conditions, an attacker can bypass DNS01 solver selectors and trick cert-manager into using ClusterIssuer DNS credentials for arbitrary DNS providers and names, potentially exposing sensitive API keys and manipulating DNS ownership checks.
Affected context
The vulnerability appears in Kubernetes clusters running cert-manager versions 1.18.0 through 1.19.5 and 1.20.0 through 1.20.2 where:
- ACME is used for certificate issuance, and
- ClusterIssuers (or Issuers) are configured with DNS01 solvers, and
- Namespace users are permitted to create or modify ACME-related resources such as Challenges.
In these environments, the admission layer does not sufficiently enforce that a Challenge is tied to a specific Order, appropriate owner references, or an Issuer-selected solver configuration, creating an authorization gap.
Exploit preconditions
- Attack surface: Kubernetes API server via the acme.cert-manager.io Challenge custom resource.
- Required access: Ability for a namespace user or service account to create or modify Challenge resources in a namespace.
- Trigger point: Creation of a crafted Challenge object with a
spec.solverreferencing a ClusterIssuer and attacker-chosen DNS01 parameters. - Why exploitation is possible: The admission and validation logic do not strictly verify that the Challenge:
- is bound to a legitimate Order,
- carries appropriate owner references, and
- uses only Issuer-selected solvers that respect DNS01 selector rules (e.g., dnsZones, dnsNames, matchLabels).
This missing linkage allows arbitrary solver usage with privileged ClusterIssuer credentials.
Why this happens
The root cause is an authorization design flaw where cross-resource relationships and policy constraints are not enforced consistently at creation time for ACME Challenge objects.
Instead of ensuring that Challenge resources are derived solely from trusted controller logic tied to Orders and Issuer-selected solvers, the system allows general namespace principals to instantiate Challenges with arbitrary spec.solver configurations.
This maps to CWE-863: Incorrect Authorization, as authorization decisions fail to account for the context-specific constraints (Order, Issuer, solver selectors) that should govern whether a particular Challenge configuration is permitted.
Conceptually, the API surface trusts user-supplied linkage (e.g., solver references and DNS parameters) for a highly sensitive operation—using ClusterIssuer DNS01 credentials—without verifying that these values were delegated by a higher-privileged configuration.
Potential impact
- Abuse of ClusterIssuer DNS01 credentials to solve ACME challenges for attacker-chosen DNS names.
- Exposure of sensitive DNS credentials, such as
X-Api-UserandX-Api-Keyheaders for acme-dns integrations. - Circumvention of DNS01 solver selectors (dnsZones, dnsNames, matchLabels), weakening domain ownership validation policies.
- Mis-issuance of TLS certificates for domains within the scope of ClusterIssuer credentials, potentially enabling man-in-the-middle or spoofing attacks.
- Lateral impact on other tenants or namespaces in multi-tenant clusters that rely on shared ClusterIssuers.
General mitigation guidance
Effective mitigation centers on tightening authorization boundaries and limiting who can influence ACME challenge flows:
- Restrict who can create or modify ACME-related custom resources (especially Challenges) using Kubernetes RBAC, ensuring only cert-manager controllers or tightly controlled service accounts have write access.
- Treat ClusterIssuers as cluster-level security assets and limit their usage to trusted namespaces or workloads through policy controls and admission policies.
- Design DNS01 solvers with strict scoping and least privilege, using provider API credentials limited to narrow DNS zones and accounts where possible.
- Prefer a pattern where end-users request certificates through higher-level, validated abstractions (e.g., Certificate resources) rather than directly manipulating low-level ACME artifacts.
- Apply defense-in-depth by layering admission policies (e.g., validating admission policies, policy engines) that verify ownership references and disallow direct user control over solver configuration fields.
How teams detect issues like this
Detection usually involves monitoring both configuration and runtime behaviors:
- Use policy-as-code or admission control engines to flag or reject Challenges whose
spec.solveris not derived from Issuer or ClusterIssuer configurations, or that reference unexpected DNS providers or zones. - Configure audit logging for the Kubernetes API server and watch for unusual Challenge creations, particularly from non-controller identities or across many unrelated DNS names.
- Employ static or configuration analysis on cluster manifests and GitOps repositories to identify RBAC roles that grant broad write access to cert-manager CRDs and refine those permissions.
- Periodically review cert-manager logs for anomalies, such as repeated failed validations or unexpected provider endpoints, which may indicate solver abuse.

