
Independent lab reproduction and post-patch verification tool for CVE-2026-112816 (LXD/MicroCloud mTLS chain bypass).
Independent reproduction, root-cause analysis, and detection guidance.
LXD and MicroCloud authenticate remote API clients over mutual TLS by comparing the client's certificate against a trust store. Before the fix, the server compared every certificate the client sent against that store, instead of only the leaf.
Only the leaf proves possession of a private key. Certificates after the leaf are unauthenticated data the client chose to attach. An attacker who can reach the HTTPS API and who knows the public certificate of any trusted client can therefore:
[attacker leaf] + [victim's public certificate] as their TLS client chain,The victim's public certificate is not a secret — it is presented in the handshake, is present in cluster join traffic in MicroCloud, and is routinely recorded in configuration management. No private key is needed.
Impact is bounded only by what the impersonated client may do. If that client is unrestricted, the attacker effectively gains control of the LXD daemon and, through it, the host.
| CVE | CVE-2026-112816 |
| Class | CWE-295 Improper Certificate Validation → authentication bypass |
| Advisory | Canonical security advisory, 28 Oct 2026 |
| Reported by | Referred to Canonical by the Incus project (credited there: stgraber) |
| Fixed | LXD 6.10.1, 5.21.9, 5.0.11, 4.0.15 · MicroCloud 3.4.1, 2.1.5 (2026-10-29) |
| Reproduced on | LXD 3.20, isolated container lab, 1 Nov 2026 |
This is not the original discovery. The vulnerability was found, reported and fixed before this repository existed. Everything here is an independent reproduction and explanation prepared after public disclosure, for defenders and for researchers studying the pattern.
poc/verify.py is the single source of proof. It pairs a negative control with the exploit, so a
bare HTTP 200 cannot be mistaken for authentication.
=== CVE-2026-112816 decisive check ===
target : 127.0.0.1:8443/1.0/certificates
[1/3] control: attacker leaf only (no trusted certificate)
TLS TLSv1.3 / TLS_AES_128_GCM_SHA256 -> HTTP 403
=> REFUSED (expected)
[2/3] exploit: attacker leaf + trusted public certificate
chain: attacker_chain.pem (2 certs)
TLS TLSv1.3 / TLS_AES_128_GCM_SHA256 -> HTTP 200
=> ACCEPTED
[3/3] authority: response must contain the trust store
trust entries returned: 1
[0] CN=trusted-client fingerprint=211cab96ad2e
VERDICT: [VULNERABLE]
reason: the same leaf was refused alone and accepted with a trusted certificate appended, and it read the trust store
The same leaf is refused alone and accepted with a public trusted certificate appended. That asymmetry is the vulnerability.
.
├── README.md ← you are here
├── docs/
│ ├── 01-technical-analysis.md ← root cause, trust model, why it works
│ ├── 02-lab-reproduction.md ← exact, reproducible lab build
│ ├── 03-detection-and-mitigation.md ← exposure check, fix, detection
│ └── 04-disclosure-timeline.md ← public timeline and credits
├── poc/
│ ├── verify.py ← decisive check: control + exploit + verdict
│ ├── reproduce.py ← single crafted request, raw output
│ ├── make_lab_certs.sh ← throwaway lab PKI generator
│ └── README.md ← usage, design notes, exit codes
├── SECURITY.md ← scope, authorised-use terms, contact
└── LICENSE
# 1. Generate the lab certificates: a "victim" certificate to trust, an attacker
# keypair, and the crafted chain [attacker leaf] + [trusted public cert].
./poc/make_lab_certs.sh --out /tmp/lab
# 2. Register the victim certificate and expose the API on the lab daemon.
lxc config trust add /tmp/lab/trusted_client.crt
lxc config set core.https_address :8443
# 3. Run the decisive check.
python3 poc/verify.py --host 127.0.0.1 --port 8443 \
--chain /tmp/lab/attacker_chain.pem --key /tmp/lab/attacker_private.key
verify.py exits 0 when the target is patched, 1 when vulnerable, 2 on a TLS error and 3
when the result is inconclusive, so it can be wrapped by an audit script or CI.
The HTTPS listener is configured to request client certificates without requiring or
verifying them (tls.RequestClientCert). That is deliberate: LXD trust is a fingerprint match
against a per-daemon store, not a PKI. The bug is that the trust lookup iterated over
r.TLS.PeerCertificates — the whole chain as received — rather than PeerCertificates[0]. Since
the chain is client-supplied and unverified, any entry in it could satisfy the lookup. The fix
narrows every trust-store comparison to the first peer certificate.
docs/01-technical-analysis.md covers the annotated request flow, the affected code paths (certificate renewal and deletion, the VM agent connection, the authorization scriptlet), where an attacker obtains the public certificate, and the reasoning behind the CVSS 10.0 score.
sudo snap refresh lxd # ≥ 6.10.1 (6/stable), 5.21.9, 5.0.11, 4.0.15
sudo snap refresh microcloud # ≥ 3.4.1 (3/stable), 2.1.5
snap list lxd microcloud # verify the installed version, not the refresh result
Check exposure — a standalone LXD that never set core.https_address is not reachable over the
network at all:
lxc config get core.https_address
lxc config trust list
Confirm the patch behaviourally:
python3 poc/verify.py --host <target> --port 8443 \
--chain attacker_chain.pem --key attacker_private.key
# exit 0 + "VERDICT: [PATCHED]"
Full defender guidance, including how a successful bypass looks from the network side, is in docs/03-detection-and-mitigation.md.
This repository is a lab reproducer and analysis. It contains no scanner, no payload, no
post-exploitation tooling and no target list. verify.py and reproduce.py default to
127.0.0.1 on purpose.
Running this against infrastructure you do not own or have written authorization to test is illegal in most jurisdictions and is not a supported use of this code. See SECURITY.md.
GHSA-99jp-jwmc-65p4 (canonical/lxd) — linked from the advisorycore.https_address and the default Unix-socket-only postureMIT — see LICENSE. Documentation is provided as-is, without warranty, for defensive and educational use.