CVE-2026-56111: Improper Validation of Array Index in MarlinFirmware Marlin
Marlin Firmware through 2.1.2.7, fixed in commit 1f255d1, when built with MESH_BED_LEVELING enabled, contains an out-of-bounds write vulnerability in the M421 G-code handler that allows attackers to corrupt firmware memory by supplying out-of-range X and Y grid indices. Attackers can send a single crafted G-code command via USB serial, network interface, or malicious gcode file to write an attacker-controlled 32-bit float value past the z_values array bounds, corrupting adjacent firmware variables and causing denial of service or firmware state corruption.
AI Analysis
Technical Summary
CVE-2026-56111 is an out-of-bounds write vulnerability in Marlin Firmware through version 2.1.2.7. When the firmware is compiled with MESH_BED_LEVELING enabled, the M421 G-code handler does not properly validate array indices for X and Y grid coordinates. An attacker can exploit this by sending a crafted G-code command that writes a 32-bit float value beyond the z_values array boundary, corrupting adjacent firmware memory. This can cause denial of service or unpredictable firmware behavior. The vulnerability affects local interfaces including USB serial, network, or malicious G-code files. The issue is fixed in commit 1f255d1, but no official patch or advisory details are currently available.
Potential Impact
Successful exploitation allows an unauthenticated attacker to corrupt firmware memory by writing out-of-bounds data. This can result in denial of service or corruption of the firmware state, potentially disrupting 3D printer operation or causing unpredictable behavior. The vulnerability is exploitable remotely via network interface or locally via USB serial or malicious G-code files.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The vulnerability is fixed in commit 1f255d1, so applying the corresponding update or firmware version beyond 2.1.2.7 is recommended once available. Until then, restrict access to interfaces that accept G-code commands (USB serial, network) to trusted users only to reduce risk.
CVE-2026-56111: Improper Validation of Array Index in MarlinFirmware Marlin
Description
Marlin Firmware through 2.1.2.7, fixed in commit 1f255d1, when built with MESH_BED_LEVELING enabled, contains an out-of-bounds write vulnerability in the M421 G-code handler that allows attackers to corrupt firmware memory by supplying out-of-range X and Y grid indices. Attackers can send a single crafted G-code command via USB serial, network interface, or malicious gcode file to write an attacker-controlled 32-bit float value past the z_values array bounds, corrupting adjacent firmware variables and causing denial of service or firmware state corruption.
CVSS v4.0
Score 8.3high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-56111 is an out-of-bounds write vulnerability in Marlin Firmware through version 2.1.2.7. When the firmware is compiled with MESH_BED_LEVELING enabled, the M421 G-code handler does not properly validate array indices for X and Y grid coordinates. An attacker can exploit this by sending a crafted G-code command that writes a 32-bit float value beyond the z_values array boundary, corrupting adjacent firmware memory. This can cause denial of service or unpredictable firmware behavior. The vulnerability affects local interfaces including USB serial, network, or malicious G-code files. The issue is fixed in commit 1f255d1, but no official patch or advisory details are currently available.
Potential Impact
Successful exploitation allows an unauthenticated attacker to corrupt firmware memory by writing out-of-bounds data. This can result in denial of service or corruption of the firmware state, potentially disrupting 3D printer operation or causing unpredictable behavior. The vulnerability is exploitable remotely via network interface or locally via USB serial or malicious G-code files.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The vulnerability is fixed in commit 1f255d1, so applying the corresponding update or firmware version beyond 2.1.2.7 is recommended once available. Until then, restrict access to interfaces that accept G-code commands (USB serial, network) to trusted users only to reduce risk.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-06-18T19:15:10.650Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a3bfa2deed863c81e0bc55c
Added to database: 06/24/2026, 15:39:25 UTC
Last enriched: 07/30/2026, 00:46:00 UTC
Last updated: 08/08/2026, 12:41:11 UTC
Views: 92
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.