The vulnerability is a 'confused deputy' issue within the Aiven Operator. The operator's service account has cluster-wide permissions to read and write secrets. The ClickhouseUser and ServiceUser custom resources allowed users to specify a connInfoSecretSource which included a namespace field. The operator's controllers did not validate this namespace, trusting the user-supplied value.
This allowed an attacker with permissions to create ClickhouseUser or ServiceUser resources in one namespace to craft a resource that points to a secret in a different, potentially privileged, namespace. The operator would then use its elevated permissions to read this secret and, as described in the advisory, write the contents into a new secret in the attacker's namespace, thereby exfiltrating the data.
The primary vulnerable function is GetPasswordFromSecret in controllers/secret_password_manager.go, which was responsible for reading the secret from the user-specified namespace. A related vulnerable function, connInfoSecretRefIndexFunc, was used to set up watches on these secrets, also incorrectly using the user-provided namespace.
The patch remediates this vulnerability by removing the namespace field from the ConnInfoSecretSource API definition entirely, and modifying the controller logic to always use the namespace of the custom resource itself when accessing secrets, thus enforcing that secrets can only be accessed from within the same namespace.