Summary
Incorrect authorization in aws-privateca-issuer may let an authenticated user who can create namespace-scoped issuers use credentials stored in another namespace. The user could obtain certificates, including subordinate CA certificates, signed by that namespace's AWS Private CA.
Affected context
The issue concerns credential loading for namespace-scoped issuers in AWS Private CA Connector for Kubernetes (aws-privateca-issuer). It may arise when an issuer references a credentials Secret in a different namespace and authorization checks do not enforce the namespace boundary. The described risk applies to deployments using affected credential-loading behavior.
Exploit preconditions
- Attack surface: The issuer resource and credential-loading logic in aws-privateca-issuer
- Required access: An authenticated user with permission to create namespace-scoped issuers
- Trigger point: The controller processes an issuer that references a credentials Secret in another namespace
- Why exploitation is possible: The credential-loading authorization logic may allow cross-namespace credentials to be used for certificate requests
Why this happens
The underlying issue is an authorization check that does not adequately bind credential access to the namespace of the issuer. This can create a confused-deputy condition: the issuer controller uses credentials associated with another namespace on behalf of a user who can create an issuer in their own namespace. This maps to CWE-441: Unintended Proxy or Intermediary ('Confused Deputy') and is also related to CWE-639: Authorization Bypass Through User-Controlled Key.
Potential impact
- An attacker could obtain certificates signed by another namespace's AWS Private CA.
- An attacker may obtain subordinate CA certificates, potentially enabling further certificate issuance.
- The affected namespace's stored AWS credentials could be used outside their intended namespace boundary.
- Trust in certificate-based identity and services may be undermined.
General mitigation guidance
Mitigation generally focuses on enforcing namespace boundaries for credentials and certificate issuance.
Common defensive patterns include:
- Keeping credentials Secrets in the same namespace as the namespace-scoped issuer that uses them
- Requiring the issuer's secretRef namespace to match the issuer's namespace
- Authorizing credential access against both the requesting resource and the Secret's namespace
- Applying least-privilege permissions to issuer creation and Secret access
- Validating namespace and ownership relationships before using credentials

