A “proof” of Fermat’s Last Theorem that fits the margin
Summary
A bug in Lean (a proof-verification software) allowed researchers to create a fake "proof" of Fermat's Last Theorem by exploiting a flaw in String.Pos.Raw.extract (a function that slices strings). The bug caused a mismatch between Lean's logical definition and its compiled native code, allowing contradictions that could "prove" false statements. The Lean team fixed the issue within hours to days of the report.
Solution / Mitigation
The patch is incorporated in Lean v4.34.0-rc1. The fix addressed both a memory-safety problem (merged about 3 hours after the report) and a semantic mismatch issue (fixed about 5 days after the report). Users should upgrade to v4.34.0-rc1 or later. Additionally, when validating proofs, check #print axioms to ensure no untrusted axioms (like native_decide, which includes the compiler in the trusted boundary) are present.
Classification
Affected Vendors
Related Issues
Original source: https://blog.trailofbits.com/2026/09/09/a-proof-of-fermats-last-theorem-that-fits-the-margin/
First tracked: September 9, 2026 at 08:00 AM
Classified by LLM (prompt v3) · confidence: 75%