๐Ÿ” CVE Alert

CVE-2026-72711

MEDIUM 6.3

Lean 4 before 4.32.2 Kernel Accepts Opaque Declaration With an Unbound Free Variable

CVSS Score
6.3
EPSS Score
0.0%
EPSS Percentile
0th

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.

CWE CWE-20
Vendor leanprover
Product lean4
Published Aug 24, 2026
Last Updated Aug 24, 2026
Stay Ahead of the Next One

Get instant alerts for leanprover lean4

Be the first to know when new medium vulnerabilities affecting leanprover lean4 are published โ€” delivered to Slack, Telegram or Discord.

Get Free Alerts โ†’ Free ยท No credit card ยท 60 sec setup

CVSS v3 Breakdown

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N
Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
None
Integrity
High
Availability
None

Affected Versions

leanprover / lean4
0 < 4.32.2

References

NVD โ†— CVE.org โ†— EPSS Data โ†—
github.com: https://github.com/leanprover/lean4 github.com: https://github.com/leanprover/lean4/issues/14484 github.com: https://github.com/leanprover/lean4/pull/14498 github.com: https://github.com/endrazine/lean-cve-poc-14484 vulncheck.com: https://www.vulncheck.com/advisories/lean-4-before-kernel-accepts-opaque-declaration-with-an-unbound-free-variable

Credits

Patrick Hulin ๐Ÿ” Jonathan Brossard (MOABI)