PT-2026-81020 · Lean 4 · Lean4
CVSS v4.0
6.8
Medium
| Vector | AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N |
Name of the Vulnerable Software and Affected Versions
Lean 4 versions prior to 4.32.2
Description
The kernel fails to verify that the body of an opaque declaration is closed. Specifically, the
environment::add opaque function omits the check no metavar no fvar() call used in definition and theorem paths, allowing values with free variables absent from the local context to be accepted. A metaprogram can exploit this by creating a temporary local of type False and recording it in the type checker's inference cache. By restoring the local context while the cache entry persists and submitting an opaque declaration with the unbound variable, the kernel may infer the cached type and admit an opaque constant of type False, which allows any proposition to follow. This occurs during ordinary checked paths at maximum kernel checking without requiring axioms or unsafe casts.Recommendations
Update to version 4.32.2.
Exploit
Fix
RCE
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Lean4