The vulnerability stems from Rancher assigning overly broad permissions to the 'project-owner' role. Specifically, the createProjectMembershipRoles function in pkg/controllers/management/auth/project_cluster/common.go was using a wildcard (*) for allowed actions (verbs) on project resources. This unintentionally granted the permission to modify Pod Security Admission (PSA) settings (updatepsa).
An attacker with 'project-owner' permissions could exploit this by creating a namespace and then changing its PSA policy to 'privileged'. This would allow them to deploy privileged containers, bypassing normal security sandboxing and gaining control over the underlying host node.
The patch corrects this by replacing the wildcard with a specific list of approved verbs, explicitly excluding updatepsa. The function createClusterMembershipRoles was also patched for a similar vulnerability related to the 'cluster-owner' role.