Skip to content

Privilege escalation by ServiceAccount deployed in a Tenant Namespace

High
prometherion published GHSA-x45c-cvp8-q4fm Dec 2, 2022

Package

gomod github.com/clastix/capsule (Go)

Affected versions

<= 0.1.2

Patched versions

0.1.3

Description

A ServiceAccount deployed in a Tenant Namespace, when granted with PATCH capabilities on its own Namespace, is able to edit it and remove the Owner Reference, breaking the reconciliation of the Capsule Operator and removing all the enforcement like Pod Security annotations, Network Policies, Limit Range and Resource Quota items.

With that said, an attacker could detach the Namespace from a Tenant that is forbidding starting privileged Pods using the Pod Security labels by removing the OwnerReference, removing the enforcement labels, and being able to start privileged containers that would be able to start a generic Kubernetes privilege escalation.

Patches

Patches have been released for version 0.1.3 and all users must upgrade to this release.

Workarounds

N.A.

References

N.A.

For more information

If you have any questions or comments about this advisory:

Severity

High

CVE ID

CVE-2022-46167

Weaknesses

No CWEs

Credits