{"answers":{"affected":"3 open source packages ship an affected version, including github.com/kcp-dev/kcp.","exploited":"There is no known exploitation of GHSA-c7xh-gjv4-4jgv in the wild and no public exploit code.","fix":"Upgrade github.com/kcp-dev/kcp to 0.26.1 or later.","what":"GHSA-c7xh-gjv4-4jgv is a vulnerability in github.com/kcp-dev/kcp, published on 11 Dec 2024. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-c7xh-gjv4-4jgv and fix it if it is affected.\n\nWhat it is: GHSA-c7xh-gjv4-4jgv is a vulnerability in github.com/kcp-dev/kcp, published on 11 Dec 2024. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-c7xh-gjv4-4jgv in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/kcp-dev/kcp (Go): affected all versions; fixed in 0.26.1\n- github.com/kcp-dev/kcp (Go): affected all versions; fixed in 0.26.1\n- github.com/kcp-dev/kcp (Go): affected all versions; fixed in 0.26.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-c7xh-gjv4-4jgv/ (Markdown: https://insights.sbomify.com/GHSA-c7xh-gjv4-4jgv/index.md)","id":"GHSA-c7xh-gjv4-4jgv","markdown":"https://insights.sbomify.com/GHSA-c7xh-gjv4-4jgv/index.md","name":"GHSA-c7xh-gjv4-4jgv","record":{"aliases":["GO-2024-3325"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["privilege_escalation","security_bypass"],"network_reachable":"yes","non_default_config":true,"product_category":"Kubernetes control plane","requires_auth":"low_privilege","summary":"Users with workspace cluster-admin roles can impersonate global admin groups to bypass authorization checks and escalate privileges.","user_interaction":"not_required","vuln_class":"privilege_escalation"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Impact\n\n[Impersonation](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#user-impersonation) is a feature of the Kubernetes API, allowing to override user information. As downstream project, kcp inherits this feature. As per the linked documentation a specific level of privilege (usually assigned to cluster admins) is required for impersonation.\n\nThe vulnerability in kcp affects kcp installations in which users are granted the `cluster-admin` ClusterRole (or comparably high permission levels that grant impersonation access; the verb in question is `impersonate`) within their respective workspaces. As kcp builds around self-service confined within workspaces, most installations would likely grant such workspace access to their users. Such users can impersonate special global administrative groups, which circumvent parts of the authorizer chains, e.g. [maximal permission policies](https://docs.kcp.io/kcp/v0.26/concepts/apis/exporting-apis/#maximal-permission-policy).\n\n### Patches\n\nThe problem has been patched in #3206 and is available in kcp 0.26.1 and higher.\n\n### Workarounds\n\n- Not assigning the `cluster-admin` role (or any other role granting blanket impersonation permissions) to users.\n- A reverse proxy between users and kcp to check for the `Impersonate-Group` header and reject requests that impersonate global administrative groups.\n\n### References\n\nSee the pull request (#3206).","ecosystems":["Go"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"kcp's impersonation allows access to global administrative groups","id":"GHSA-c7xh-gjv4-4jgv","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Go","product":null,"products":[],"type":"privilege_escalation","year":"2024"},"n_packages":3,"n_references":null,"packages":[{"ecosystem":"Go","fixed":["0.26.1"],"introduced":["0"],"last_affected":[],"package":"github.com/kcp-dev/kcp","purl":null,"source":"GHSA-c7xh-gjv4-4jgv"},{"ecosystem":"Go","fixed":["0.26.1"],"introduced":["0"],"last_affected":[],"package":"github.com/kcp-dev/kcp","purl":"pkg:golang/github.com/kcp-dev/kcp","source":"GHSA-c7xh-gjv4-4jgv"},{"ecosystem":"Go","fixed":["0.26.1"],"introduced":["0"],"last_affected":[],"package":"github.com/kcp-dev/kcp","purl":"pkg:golang/github.com/kcp-dev/kcp","source":"GO-2024-3325"}],"products":null,"published":"2024-12-11","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Users with workspace cluster-admin roles can impersonate global admin groups to bypass authorization checks and escalate privileges.","url":"https://insights.sbomify.com/GHSA-c7xh-gjv4-4jgv/"}