CVE-2026-72844: Lean 4 Kernel Type Checking Bypass via Mismatched Structure Projections

Published Aug 20, 2026
·
Updated

The Lean 4 kernel does not verify that the structure named in a projection expression matches the type of the value being projected, and environment::addinductive in src/kernel/inductive.cpp did not type check the nested inductive applications that are replaced by auxiliary types, so their parametric arguments escaped checking. A metaprogram running in the Lean process can register an ill-typed nested inductive whose constructor applies a .proj C 0 projection to a value of the unrelated type W, and the kernel admits the declaration through the ordinary checked addDecl path at maximum kernel checking, without sorry, unsafeCast, debug.skipKernelTC, addDeclWithoutChecking, FFI, or a modified .olean file. The result is a type confusion yielding a proof of False that carries no axioms, from which any proposition can be derived. The published proof of concept additionally pads two expressions until their hashes and approximate depths collide, which defeats kernel caching; that is the technique used to reach the flaw, not its cause. Exploitation requires running a metaprogram in-process, for example by building a project or importing a malicious Lake dependency.

Affected Software

1 affected component
Lean Lean 4 kernel

Event History

Aug 20, 2026
CVE Published
via MITRE·05:19 PM
Data Sourced
via MITRE·05:19 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who is exposed to exploitation?

Users who build a Lean project or import a malicious Lake dependency are exposed if that action runs an attacker-controlled metaprogram in the Lean process. The issue is not described as remotely exploitable; the stated attack vector requires local code execution through an in-process metaprogram.

2

What does an attacker need to exploit this?

The attacker needs the ability to run a metaprogram in the Lean process. The proof of concept reaches the flaw through the ordinary checked addDecl path at maximum kernel checking and does not require sorry, unsafeCast, debug.skipKernelTC, addDeclWithoutChecking, FFI, modified .olean files, or a modified kernel.

3

What is the security impact if exploitation succeeds?

An attacker can cause a type confusion that produces a proof of False with no axioms. From that proof, any proposition can be derived, defeating the kernel's soundness guarantees for the affected process or build.

4

Does kernel checking or restricting common bypass mechanisms prevent this attack?

No. The described declaration is accepted through the ordinary checked addDecl path even at maximum kernel checking, and the proof of concept does not rely on the listed bypass mechanisms. The hash and approximate-depth collision padding is used to defeat kernel caching in the proof of concept, rather than being the underlying cause.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203