Firmware memory corruption via unchecked mesh indices
Published Jun 24, 2026 · Updated Jun 24, 2026
Out-of-bounds write in Marlin through 2.1.2.7 allows remote attackers to corrupt firmware memory through crafted M421 G-code. The M421 mesh-bed-leveling handler checks only whether both mesh coordinates are negative, then passes oversized indices to bedlevel.set_z, which writes an attacker-controlled float outside z_values. When MESH_BED_LEVELING is enabled and an attacker can submit G-code over a network, USB serial, or a file, one command can corrupt adjacent firmware state or interrupt service by crashing or hanging the controller.
Summary
What happened
Out-of-bounds write in Marlin through 2.1.2.7 allows remote attackers to corrupt firmware memory through crafted M421 G-code. The M421 mesh-bed-leveling handler checks only whether both mesh coordinates are negative, then passes oversized indices to bedlevel.set_z, which writes an attacker-controlled float outside z_values. When MESH_BED_LEVELING is enabled and an attacker can submit G-code over a network, USB serial, or a file, one command can corrupt adjacent firmware state or interrupt service by crashing or hanging the controller.
The record
- CVE
- CVE-2026-56111
- Published
- Jun 24, 2026
- Updated
- Jun 24, 2026
- Vendor
- Marlin Firmware
- Product
- Marlin
- Classifications
- CWE-129, T1499.004
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Jun 24, 2026CVE publishedPublication date reported by the CVE source.
- Jun 24, 2026Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=0 <=2.1.2.7
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- M421 oversized-index reproductionproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo