Summary
Rancher Manager may copy Project Secrets into a namespace when the namespace references a project through the field.cattle.io/projectId annotation without confirming that the project belongs to the same downstream cluster. A user who can create namespaces on one cluster could use a project identifier from another cluster to expose those secrets in a namespace they control.
Affected context
The issue can arise in Rancher Manager deployments where Project Secrets are propagated based on namespace annotations. Risk is higher when a user has permission to create namespaces but should not be able to access projects or secrets associated with other downstream clusters.
Exploit preconditions
- Attack surface: Rancher namespace and Project Secret propagation workflows
- Required access: Permission to create or manage namespaces on a downstream cluster
- Trigger point: Creation or processing of a namespace containing a user-controlled
field.cattle.io/projectIdannotation - Why exploitation is possible: The referenced project identifier may be accepted without validating that the project belongs to the same downstream cluster as the namespace
Why this happens
The vulnerability results from using a user-controlled project identifier as an authorization reference without binding it to the target cluster context. This creates an indirect object reference that can resolve across security boundaries, mapping to CWE-639: Authorization Bypass Through User-Controlled Key. The insecure pattern is trusting an identifier for access decisions without verifying object ownership, tenant scope, and resource relationship.
Potential impact
- An unauthorized user may obtain Project Secrets from another downstream cluster
- Exposed credentials may enable access to databases, services, or external systems
- Compromised secrets could support lateral movement or privilege escalation
- Organizations may experience cross-tenant data disclosure and loss of confidentiality
General mitigation guidance
Mitigation generally focuses on enforcing authorization within the complete resource context rather than trusting identifiers supplied by users.
Common defensive patterns include:
- Verifying that the referenced project and namespace belong to the same downstream cluster
- Applying server-side authorization checks before propagating or exposing secrets
- Treating namespace annotations and similar metadata as untrusted input
- Using opaque, context-bound references where practical
- Limiting permissions to create namespaces and access Project Secrets according to least privilege
- Avoiding secret propagation when ownership or cluster association cannot be established
How teams detect issues like this
Organizations can look for:
- Static analysis and code review checks for authorization decisions based solely on resource identifiers
- Signals where project, namespace, tenant, or cluster relationships are not validated together
- Tests that attempt cross-cluster object references using otherwise valid identifiers
- Audit events showing secret propagation after namespace creation by users without corresponding project access
- Policy enforcement requiring explicit cluster-scoped authorization before secret copies are created
Automated security review tools may help identify missing relationship and ownership checks.

