Summary
A privilege-management flaw in Strimzi can cause the Cluster Operator to grant broad Secret permissions in a target namespace to an Entity Operator service account controlled from an attacker's namespace.
An attacker who can create a Kafka custom resource may then obtain access to Secrets across namespaces where the Cluster Operator is authorized, allowing unauthorized reading or modification of sensitive data.
Affected context
The issue occurs in Strimzi deployments where users can create or modify Kafka custom resources and the Cluster Operator processes the Kafka.spec.entityOperator.watchedNamespace field. Risk increases when the Cluster Operator has permissions across multiple namespaces and the resulting service account can receive tokens. The vulnerable behavior can cross the intended STRIMZI_NAMESPACE boundary.
Exploit preconditions
- Attack surface: Kubernetes or OpenShift API through Kafka custom resources
- Required access: Permission to create a Kafka custom resource in an attacker-controlled namespace
- Trigger point: Cluster Operator reconciliation of the Entity Operator namespace configuration
- Required deployment condition: The Cluster Operator must be able to create roles and role bindings in the selected target namespace
- Why exploitation is possible: The operator creates full Secret CRUD permissions in the target namespace and binds them to a service account associated with the attacker's namespace
Why this happens
The underlying flaw is improper privilege management across namespace boundaries. Strimzi accepts a user-controlled watched-namespace value and uses it to create authorization resources without sufficiently constraining the relationship between the requested namespace, the service account, and the operator's intended scope.
This maps primarily to CWE-269: Improper Privilege Management, with related characteristics of CWE-441: Unintended Proxy or Intermediary ('Confused Deputy') and CWE-250: Execution with Unnecessary Privileges. The Cluster Operator acts with elevated authority and unintentionally delegates that authority to an attacker-controlled service account.
Potential impact
- An attacker may read sensitive Kubernetes Secrets from authorized target namespaces.
- An attacker could modify or delete Secrets, disrupting workloads or changing application configuration.
- Credentials, tokens, or connection information may be exposed.
- Compromised Secrets could enable further access to applications, infrastructure, or data.
- Namespace isolation and organizational access boundaries could be weakened.
General mitigation guidance
Mitigation generally focuses on constraining operator-delegated permissions and treating namespace selection as an authorization decision rather than ordinary configuration.
Common defensive patterns include:
- Restricting Kafka custom-resource creation and modification to trusted identities.
- Allowing watched namespaces only through an explicit, policy-controlled allowlist.
- Scoping service-account permissions to the minimum resources and namespaces required.
- Avoiding full Secret create, read, update, and delete permissions when narrower access is sufficient.
- Separating operator privileges from tenant-controlled service accounts.
- Applying Kubernetes admission policies to reject cross-namespace configurations that violate tenancy boundaries.
- Auditing and periodically reviewing ClusterRole, Role, RoleBinding, and service-account relationships.
- Using least-privilege tokens and limiting token creation capabilities.
How teams detect issues like this
Detection can combine configuration review, authorization analysis, and runtime monitoring.
Useful approaches include:
- Static and policy analysis for user-controlled namespace fields that influence Role or RoleBinding creation.
- Code review checks for operators that copy privileges across namespaces or bind elevated permissions to tenant-controlled service accounts.
- Admission policies that flag or deny watched namespaces outside an approved scope.
- Auditing Kubernetes API events for unexpected Role, RoleBinding, Secret, or service-account token activity.
- Reviewing effective permissions with authorization tools and comparing them against intended namespace boundaries.
- Monitoring for service accounts reading or modifying Secrets outside their normal workload namespace.

