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, specifically in the M421 G-code handler when built with MESH_BED_LEVELING enabled. The vulnerability arises from improper validation of array indices for X and Y grid coordinates, allowing an attacker to write a 32-bit float value beyond the z_values array bounds. This memory corruption can affect adjacent firmware variables, leading to denial of service or corruption of the firmware state. The vulnerability can be triggered remotely by sending a crafted G-code command via USB serial, network interface, or a malicious G-code file. The issue was fixed in commit 1f255d1, but no official patch or vendor advisory is provided in the data.
Potential Impact
Successful exploitation allows an unauthenticated attacker to corrupt firmware memory by writing out-of-bounds data, potentially causing denial of service or unpredictable firmware behavior. This can disrupt 3D printer operation or cause persistent firmware state corruption, impacting device reliability and safety.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The vulnerability was fixed in commit 1f255d1, so upgrading to a version including this fix is recommended once available. Until then, avoid enabling MESH_BED_LEVELING if possible or restrict access to interfaces that accept G-code commands from untrusted sources.
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, specifically in the M421 G-code handler when built with MESH_BED_LEVELING enabled. The vulnerability arises from improper validation of array indices for X and Y grid coordinates, allowing an attacker to write a 32-bit float value beyond the z_values array bounds. This memory corruption can affect adjacent firmware variables, leading to denial of service or corruption of the firmware state. The vulnerability can be triggered remotely by sending a crafted G-code command via USB serial, network interface, or a malicious G-code file. The issue was fixed in commit 1f255d1, but no official patch or vendor advisory is provided in the data.
Potential Impact
Successful exploitation allows an unauthenticated attacker to corrupt firmware memory by writing out-of-bounds data, potentially causing denial of service or unpredictable firmware behavior. This can disrupt 3D printer operation or cause persistent firmware state corruption, impacting device reliability and safety.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The vulnerability was fixed in commit 1f255d1, so upgrading to a version including this fix is recommended once available. Until then, avoid enabling MESH_BED_LEVELING if possible or restrict access to interfaces that accept G-code commands from untrusted sources.
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: 06/24/2026, 15:54:11 UTC
Last updated: 06/24/2026, 16:54:21 UTC
Views: 3
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.