Impact
Marlin Firmware version 2.1.2.7 and earlier, when built with MESH_BED_LEVELING, contains an out‑of‑bounds write in the M421 G‑code handler. By supplying X and Y grid indices that exceed the array bounds, an attacker can write an arbitrary 32‑bit float past the z_values array, corrupting adjacent firmware variables and causing denial of service or firmware state corruption.
Affected Systems
The affected products are Marlin Firmware from MarlinFirmware:Marlin. Versions up to and including 2.1.2.7, compiled with MESH_BED_LEVELING enabled, are vulnerable. The issue was fixed in the commit 1f255d1 and subsequent releases.
Risk and Exploitability
The CVSS score of 8.3 indicates a high severity vulnerability. EPSS is not available, and the vulnerability is not listed in the CISA KEV catalogue. The attack can be performed by sending a single crafted G‑code command over USB, a network interface, or a malicious gcode file, so an attacker with access to send G‑code to the printer can exploit the flaw without additional privileges.
OpenCVE Enrichment