Lean 4 before 4.32.2 Kernel Accepts Opaque Declaration With an Unbound Free Variable
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Passive
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- —
- Confidentiality · integrity · availability
- None · High · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| leanprover | lean4 | before 4.32.2 | 4.32.2 | Patch available | CNA |
- lean4 Vendorleanprover Affected before 4.32.2 Fixed in 4.32.2 Patch available CNA
Remediation
- Fix · CNA lean4 (leanprover) Fixed in 4.32.2
Timeline
- 2026-10-02 Threatist record created from CVE-2026-72711
- 2026-10-03 Alias added: GHSA-fhmq-xvc2-q54h
References
More leanprover vulnerabilities
- TI-2026-51070 Lean 4 Kernel Type Checking Bypass via Mismatched Structure Projections CVSS 4.0MEDIUM 6.8
- TI-2026-25224 XSS in @leanprover/unicode-input-component CVSS 4.0N/A 0.0
Sources
- CVE-2026-72711 · CVE Program
- CVE-2026-72711 · NVD
- FIRST EPSS
- GHSA-fhmq-xvc2-q54h · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences