Lean 4 Kernel Type Checking Bypass via Mismatched Structure Projections
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::add_inductive 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.
- Products
- lean4
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-72844
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 29 Oct 2026, 07:55 UTC · Revision 1
Source evidence
Lean 4 Kernel Type Checking Bypass via Mismatched Structure Projections
core-cve · Original sourcePublished 20 Aug 2026, 17:19 UTC
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::add_inductive 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.
cve:CVE-2026-72844
lean4
Fixed versions: Not specified
Complete source record
{
"id": "4f1bee7000703a171dcd8491cd5a27c8a6e06cb38ae3f9affee923bd452bbf6a",
"url": "https://www.cve.org/CVERecord?id=CVE-2026-72844",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Lean 4 Kernel Type Checking Bypass via Mismatched Structure Projections",
"summary": "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::add_inductive 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.",
"evidence": "cve:CVE-2026-72844",
"products": [
{
"name": {
"value": "lean4",
"evidence": "/containers/cna/affected/0/product"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": []
}
],
"severity": "medium",
"structured": {
"id": "CVE-2026-72844",
"aliases": [
"CVE-2026-72844"
],
"metrics": [
{
"format": "CVSS",
"cvssV3_1": {
"scope": "CHANGED",
"version": "3.1",
"baseScore": 6.3,
"attackVector": "LOCAL",
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N",
"integrityImpact": "HIGH",
"userInteraction": "REQUIRED",
"attackComplexity": "LOW",
"availabilityImpact": "NONE",
"privilegesRequired": "NONE",
"confidentialityImpact": "NONE"
}
},
{
"format": "CVSS",
"cvssV4_0": {
"version": "4.0",
"baseScore": 6.8,
"attackVector": "LOCAL",
"baseSeverity": "MEDIUM",
"vectorString": "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",
"userInteraction": "PASSIVE",
"attackComplexity": "LOW",
"attackRequirements": "NONE",
"privilegesRequired": "NONE",
"subIntegrityImpact": "NONE",
"vulnIntegrityImpact": "HIGH",
"subAvailabilityImpact": "NONE",
"vulnAvailabilityImpact": "NONE",
"subConfidentialityImpact": "NONE",
"vulnConfidentialityImpact": "NONE"
}
}
],
"affected": [
{
"repo": "https://github.com/leanprover/lean4",
"vendor": "leanprover",
"product": "lean4",
"versions": [
{
"status": "affected",
"version": "0",
"lessThan": "4.32.2",
"versionType": "semver"
},
{
"status": "unaffected",
"version": "4.32.2",
"versionType": "semver"
},
{
"status": "affected",
"version": "4.33.0-rc1",
"versionType": "semver"
}
],
"defaultStatus": "unaffected"
}
],
"modified": "2026-10-26T01:23:59.293Z",
"provider": "cve",
"references": [
"https://github.com/leanprover/lean4/issues/14576",
"https://github.com/leanprover/lean4/commit/a39eab69e1eee9ad38f4efe507907b1026a77808",
"https://github.com/leanprover/lean4/pull/14577",
"https://github.com/endrazine/lean-cve-poc",
"https://github.com/xrchz/CollatzLean",
"https://www.openwall.com/lists/oss-security/2026/08/02/1",
"https://github.com/leanprover/lean4",
"https://www.vulncheck.com/advisories/lean-4-kernel-type-checking-bypass-via-mismatched-structure-projections"
],
"provider_metadata": {
"adp": [
{
"title": "CISA ADP Vulnrichment",
"metrics": [
{
"other": {
"type": "ssvc",
"content": {
"id": "CVE-2026-72844",
"role": "CISA Coordinator",
"options": [
{
"Exploitation": "poc"
},
{
"Automatable": "no"
},
{
"Technical Impact": "partial"
}
],
"version": "2.0.3",
"timestamp": "2026-08-21T21:13:48.944575Z"
}
}
}
],
"providerMetadata": {
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP",
"dateUpdated": "2026-08-21T21:46:54.936Z"
}
},
{
"title": "CVE Program Container",
"references": [
{
"url": "http://www.openwall.com/lists/oss-security/2026/10/26/2"
}
],
"providerMetadata": {
"orgId": "af854a3a-2127-422b-91ae-364da2661108",
"shortName": "CVE",
"dateUpdated": "2026-10-26T01:23:59.293Z"
}
}
],
"cna": {
"orgId": "83251b91-4cc7-4094-a5c7-464a1b83ea10",
"shortName": "VulnCheck",
"dateUpdated": "2026-08-21T11:20:58.955Z"
}
}
},
"related_cves": [
{
"value": "CVE-2026-72844",
"evidence": "/cveMetadata/cveId"
}
],
"security_relevant": true,
"severity_evidence": "/containers/cna/metrics"
},
"source_id": "core-cve",
"document_id": 231510,
"published_at": "2026-08-20T17:19:34.054+00:00"
}