Marlin Firmware through 2.1.2.7, fixed in commit 1f255d1, when built with MESHBEDLEVELING 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.
{
"cna_assigner": "VulnCheck",
"cwe_ids": [
"CWE-129"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/56xxx/CVE-2026-56111.json"
}[
{
"target": {
"file": "Marlin/src/gcode/bedlevel/mbl/M421.cpp"
},
"signature_type": "Line",
"deprecated": false,
"signature_version": "v1",
"source": "https://github.com/marlinfirmware/marlin/commit/1f255d16ec2d456454fd444494cfb338d62b0fa1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"65084144221909310942370447431265322160",
"175907672631708315228212289292572651484",
"147031761490418648937213108883542478042",
"204959399880849597872883576694047224689"
]
},
"id": "CVE-2026-56111-9adc8e13"
},
{
"target": {
"function": "GcodeSuite::M421",
"file": "Marlin/src/gcode/bedlevel/mbl/M421.cpp"
},
"signature_type": "Function",
"deprecated": false,
"signature_version": "v1",
"source": "https://github.com/marlinfirmware/marlin/commit/1f255d16ec2d456454fd444494cfb338d62b0fa1",
"digest": {
"function_hash": "65593862883820517918883272994487778399",
"length": 850.0
},
"id": "CVE-2026-56111-9ee64fc1"
}
]
"2026-08-12T16:41:25Z"
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-56111.json"