
PoC lab for CVE-2026-130587: demonstrates OpenFunction <=1.2.0 privilege escalation where a tenant-supplied Serving PodSpec yields privileged host-namespace pods.
| CVE | CVE-2026-130587 |
| Component | OpenFunction — pkg/core/serving/openfuncasync/servingrun.go::generateWorkload() |
| Affected | OpenFunction through 1.2.0 |
| Fixed in | no vendor fix (upstream issue #532 OPEN); the lab's fixed side carries a documented synthetic boundary guard (sha256 in evidence/versions.txt) |
| CWE | CWE-269 (Improper Privilege Management), CWE-266 (Incorrect Privilege Assignment) |
| Impact | A namespace tenant who can create Function/Serving resources — but has no Pod-create or cluster-admin rights — makes the operator schedule a privileged pod with host namespaces and a hostPath mount of the node root filesystem: escape from the namespace to node access |
| Vector | Kubernetes API — Serving.spec.template (a full corev1.PodSpec) |
| Trigger | one CR whose spec.template sets privileged: true, hostPID/hostNetwork/hostIPC, and a hostPath: / volume |
Serving.Spec.Template is a *corev1.PodSpec supplied by the tenant. The
operator takes it verbatim:
// pkg/core/serving/openfuncasync/servingrun.go @ v1.2.0 (~L320)
spec := s.Spec.Template
if spec == nil {
spec = &corev1.PodSpec{}
}
...
// `spec` becomes the PodTemplateSpec of the generated Deployment /
// StatefulSet / Job, created with the operator's own credentials
No field filtering, Pod Security admission, or ValidatingAdmissionPolicy
is applied by the project. This lab builds a Go driver against the real
v1.2.0 controller module and calls its actual generateWorkload()
method, so the evidence is the operator's own output — not a simulation
of the CRD shape.
Kubernetes RBAC separates create functions/servings from
create pods. The operator bridges that gap unsafely: the tenant-authored
PodSpec is passed through to the generated workload. Security-relevant
fields that a tenant could never set on a Pod directly — host namespaces,
hostPath volumes, privileged containers, host ports, node selectors —
are therefore granted to the tenant through the operator's service
account. The resulting pod can mount the node root and read kubelet
credentials, i.e. escalate from a single namespace to node/cluster level.
| service | image | role |
|---|---|---|
of-vuln | cve-2026-130587:vuln | Go driver against unmodified OpenFunction v1.2.0 |
of-fixed | cve-2026-130587:fixed | same module + synthetic PodSpec guard (issue #532 has no vendor fix) |
poc | cve-2026-130587-poc:local | stdlib-only Python driver |
The HTTP service models the operator boundary: POST /generate accepts
a Serving CR, runs the real workload generator as a child process, and
reports the host-security fields of the resulting workload. The harness
uses a fake controller-runtime client and the same-package bridge only to
reach the unexported generator; the generator itself is upstream code on
both sides.
./run-lab.sh build # Go builds both trees (v1.2.0 and v1.2.0 + guard)
./run-lab.sh up # cve130587lab network: of-vuln / of-fixed
./run-lab.sh sweep # check / exploit / probe / mitigation on both sides
./run-lab.sh down
A standalone full-chain exploit script ships at exploit/exploit.py
(python3 exploit/exploit.py --host=<target>; exit 1 on confirmed
exploitation, 0 on a safe target).
poc/poc.py (stdlib only) constructs Serving CRs with a hostile
spec.template:
restricted plus a ValidatingAdmissionPolicy on
Serving.spec.template until upstream ships a fix.| case | of-vuln (v1.2.0) | of-fixed (synthetic guard) |
|---|---|---|
| benign Serving | workload generated, no escape fields | workload generated |
| hostile Serving | hostPID/hostNetwork/hostIPC true, hostPath: /, privileged container | rejected: "host namespaces are not allowed" |
probe privileged / hostPID / hostNetwork / hostIPC / hostPath | all five reach the workload | all five rejected with distinct errors |
Captured runs: evidence/check-*-run.txt, evidence/exploit-*-run.txt,
evidence/probe-*-run.txt, evidence/mitigation-*-run.txt,
evidence/versions.txt, evidence/0day-sweep.txt.
cve130587lab
network.Serving.spec.triggers must be present ({}) or the controller panics
in GetDaprServiceEnabled — a harness detail documented in
evidence/versions.txt.CGO_ENABLED=0 for the alpine runner.The per-field matrix (evidence/0day-sweep.txt) confirms the synthetic
guard intercepts all five escaping fields individually while leaving the
benign path intact. No bypass form was found in the generator: the check
runs after the PodSpec is read from the CR and before any workload object
is built. Because upstream issue #532 remains open and no fixed release
exists, the vendor-side result is pending; deployments should enforce
Pod Security restricted on the operator namespace and validate
Serving.spec.template with a ValidatingAdmissionPolicy now.
README.md this write-up
run-lab.sh environment driver (build / up / sweep / down)
Makefile convenience targets
exploit/exploit.py standalone full-chain exploit
poc/poc.py the PoC (check / exploit / probe / mitigation)
poc/Dockerfile runner image (python:3.12-alpine)
lab/lab.Dockerfile multi-stage build of both controller trees
lab/patches/validate-podspec.patch the synthetic fixed-side guard
lab/harness/ same-package bridge + Go driver
lab/service.py HTTP boundary service (POST /generate)
evidence/ captured runs of every mode on both sides
TRACKING.md excluded (working record)