CVE-2026-72711
Description
The Lean 4 kernel does not check that the body of an opaque declaration is closed. environment::add_opaque omits the check_no_metavar_no_fvar call that the definition and theorem paths perform, so a value containing a free variable that is absent from the local context is not rejected outright. A metaprogram can first cause the kernel to create a temporary local of type False and record its type in the type checker's inference cache, then restore the local context while that cache entry persists on the same type checker instance, and finally submit an opaque declaration whose value is the now-unbound variable. The cache lookup answers before the branch that would test membership of the local context, so the kernel infers the cached type and admits an opaque constant of type False, from which any proposition follows. The declaration is accepted through the ordinary checked path at maximum kernel checking, without sorry, unsafeCast, debug.skipKernelTC, addDeclWithoutChecking, foreign code or a modified .olean file, and the result carries no axioms. Fixed in 4.32.2 by adding the missing closure check.
Weakness
- CWE-20: Improper Input Validation
CISA SSVC decision points
| Exploitation | poc |
|---|---|
| Automatable | no |
| Technical impact | partial |
| Scored | 2026-08-24 |
Timeline
- 2026-08-24Published by the CNA20:08 UTC
- 2026-08-24CISA SSVC decision recordedsame day
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| leanprover lean4 | from 0 before 4.32.2fixed in 4.32.2 | 4.32.2 |
References
- https://github.com/leanprover/lean4/pull/14498
- https://github.com/endrazine/lean-cve-poc-14484
- http://www.openwall.com/lists/oss-security/2026/10/26/3
- https://github.com/leanprover/lean4
- https://github.com/leanprover/lean4/issues/14484
- https://www.vulncheck.com/advisories/lean-4-before-kernel-accepts-opaque-declaration-with-an-unbound-free-variable
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2026-72711'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2026-72711'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2026-72711'curl 'https://api.contrastcyber.com/cve_products/CVE-2026-72711'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).