# CVE-2026-72711: Lean 4 before 4.32.2 Kernel Accepts Opaque Declaration With an Unbound Free Variable

- Severity: Medium 6.8 (CVSS:4.0, scored by VulnCheck) `CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.14%, higher than 3% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-08-24T20:08:33.219Z
- Modified: 2026-10-26T02:17:07.503Z
- Weaknesses: CWE-20
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: VulnCheck

## 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.

(As written by CVE List.)

## Affected

- leanprover lean4: before 4.32.2

## Every score

- VulnCheck: CVSS:4.0 6.8 Medium `CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N`
- VulnCheck: CVSS:3.1 6.3 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N`

## References

- <https://github.com/endrazine/lean-cve-poc-14484> (exploit)
- <https://github.com/leanprover/lean4> (product)
- <https://github.com/leanprover/lean4/issues/14484> (issue-tracking)
- <https://github.com/leanprover/lean4/pull/14498> (issue-tracking, patch)
- <https://www.vulncheck.com/advisories/lean-4-before-kernel-accepts-opaque-declaration-with-an-unbound-free-variable> (third-party-advisory)
- <http://www.openwall.com/lists/oss-security/2026/10/26/3>

## Sources

- CVE List: [CVE-2026-72711](https://www.cve.org/CVERecord?id=CVE-2026-72711), CVE Terms of Use, modified 2026-10-26
- NVD: [CVE-2026-72711](https://nvd.nist.gov/vuln/detail/CVE-2026-72711), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-72711 · Whole record: https://cve.day/CVE-2026-72711.json · Rebuilt by cve.day 2026-11-25T22:59:35.065Z
