
Proof-of-concept lab for CVE-2026-129360: Magma orc8r obsidian REST operator impersonation via the spoofable X-Magma-Client-Cert-Serial header, with vuln/fixed containers and a Python PoC.
X-Magma-Client-Cert-Serial header| CVE | CVE-2026-129360 |
| Component | Linux Foundation Magma orc8r — orc8r/cloud/go/services/obsidian/access/operator.go (getOperator) behind CertificateMiddleware (rest_middleware.go) |
| Affected | Magma ≤ 1.9.0 (logic unchanged in master at lab time) |
| Fixed in | nothing upstream at the time of this laboratory; the fixed side is a hash-checked synthetic remediation (documented as such) |
| CWE | CWE-290 (Authentication Bypass by Spoofing) |
| Impact | Operator impersonation on the NMS/obsidian REST tier: a caller who knows (or guesses) a registered operator certificate serial authenticates as that operator with nothing but a header — certificate serials are not secret, and no certificate possession is checked |
| Vector | Network — an HTTP request carrying X-Magma-Client-Cert-Serial: <registered operator serial> |
| Trigger | the header value alone; unknown serials are rejected through the real certifier lookup |
The obsidian REST tier resolves the caller's identity from a header:
// orc8r/cloud/go/services/obsidian/access/operator.go
csn := req.Header.Get(CLIENT_CERT_SN_KEY) // attacker-controlled header
certInfo, err := certifier.GetCertificateIdentity(req.Context(), csn)
...
return certInfo.Id, nil // operator identity
The design assumes a trusted TLS-terminating proxy injects that header
from the verified client certificate. When the header is reachable
by the client (direct service exposure, a proxy that forwards
client-supplied headers, or any topology where the assumption breaks),
knowing a registered operator serial — which is not a secret — is
the whole authentication. This laboratory runs the real
CertificateMiddleware behind the real certifier client against a
certifier gRPC server implementing the real protobuf service with
one registered operator certificate, and proves the spoof: the
registered serial authenticates with no certificate at all, while
unknown serials are rejected through the real lookup path.
getOperator treats the header as ground truth about certificate
possession. Three facts compose into the spoof:
req.TLS and req.TLS.PeerCertificates are never
consulted;The middleware chain (CertificateMiddleware) calls getOperator
before anything else; on success the operator identity flows into the
ACL check. The lab mounts the middleware on a static-READ path (GET
under /swagger), which skips the entity-ACL stage — isolating exactly
the authentication stage under test.
| service | image | role |
|---|---|---|
obs-vuln | cve-2026-129360:vuln | Magma v1.9.0 as released: the real middleware + real certifier client + a real-proto certifier server with one registered operator certificate |
obs-fixed | cve-2026-129360:fixed | the same tree with lab/patch-fixed.py (hash-checked): the serial header is only trusted when a TLS client certificate was actually presented |
poc | cve-2026-129360-poc:local | stdlib-only Python driver |
The harness (lab/harness/main.go) links the real obsidian/access
package (echo v4, the framework magma itself uses) and the real
certifier.GetCertificateIdentity client. The certifier backend
implements the real CertifierServer protobuf interface and holds one
registered operator certificate (serial LABOPERATORSN0001, operator
lab-operator) — a minimal faithful model of a production certifier.
The HTTP endpoint never requests a TLS client certificate, exactly like
the header-trusting topology of the advisory.
./run-lab.sh build # fetches magma v1.9.0, builds vuln + fixed harnesses
./run-lab.sh up # cve129360lab network, obs-vuln, obs-fixed
./run-lab.sh sweep # check / exploit / probe / mitigation on both sides
./run-lab.sh down
Single mode against one side:
podman run --rm --network cve129360lab cve-2026-129360-poc:local \
exploit --host=obs-vuln
poc/poc.py (stdlib only):
| run | obs-vuln (v1.9.0) | obs-fixed (synthetic) |
|---|---|---|
check registered SN, no certificate | HTTP 200, authenticated: true, operator resolved | HTTP 401 (client certificate required) |
check unknown SN | HTTP 401 (unknown certificate SN — real lookup) | HTTP 401 |
check no header | HTTP 401 (missing client certificate) | HTTP 401 |
exploit controls (unknown/empty/absent) | all 401 | all 401 |
probe GET/HEAD/POST with registered SN | 200 on every verb | 401 on every verb |
probe lowercased / 200-byte serials | 401 through the real lookup | 401 |
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.
cve129360lab network.The serial-shape and verb matrix is the surface sweep
(evidence/0day-sweep.txt): only the exact registered serial
authenticates on the shipped build (every mutation goes through the
real lookup and is rejected), and on the remediated build every form is
rejected. No second bypass form was found. The gRPC-tier hardcoded
constant is CVE-2026-129359, reproduced in
CVE-2026-129359.
README.md this write-up
run-lab.sh environment driver (build / up / sweep / down)
Makefile convenience targets
poc/poc.py the PoC (check / exploit / probe / mitigation)
poc/Dockerfile runner image (python:3.12-alpine)
lab/lab.Dockerfile multi-stage build (magma v1.9.0 + harness)
lab/patch-fixed.py the hash-checked synthetic remediation
lab/harness/main.go real-middleware + real-certifier-client harness
lab/harness/go.mod upstream consumer-module replace pattern
evidence/ captured runs of every mode on both sides
TRACKING.md excluded (working record)