PT-2022-27782 · Capsule · Capsule

Maxfedotov

+1

·

Published

2022-12-02

·

Updated

2024-08-21

·

CVE-2022-46167

CVSS v3.1

8.8

High

VectorAV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions Capsule versions prior to 0.1.3
Description Capsule is a multi-tenancy and policy-based framework for Kubernetes. 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. 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.
Recommendations For versions prior to 0.1.3, upgrade to version 0.1.3 to resolve the issue. As a temporary workaround, consider restricting the PATCH capabilities on the Namespace for the ServiceAccount deployed in the Tenant Namespace until the upgrade is applied. Additionally, restrict access to the vulnerable OwnerReference and enforcement labels, such as Pod Security annotations, Network Policies, Limit Range, and Resource Quota items, to minimize the risk of exploitation.

Exploit

Fix

Incorrect Authorization

Weakness Enumeration

Related Identifiers

CVE-2022-46167
GHSA-X45C-CVP8-Q4FM
GO-2022-1135

Affected Products

Capsule