CVE-2026-56111

Critical

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.

SeverityCritical
CVSS9.1
Exploit probability—
ProductMarlin
PublishedJun 24, 2026
First seenJun 24, 2026
Weakness typeCWE-129CWE-129

How to fix

Affected products

ProductAffected versionsFixed in
MarlinFirmware Marlinv ≤ 2.1.2.7—

Check your version

Choose the product and enter the version you run to see whether it falls in the affected range.

In the Intelligence 360 plan

Attack Surface Management

See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.