{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "2.1.2.7"
              }
            ],
            "source": [
              "DESCRIPTION",
              "REFERENCES"
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3b8ab730b259e1388646050855aa133c85a077cb"
            },
            {
              "fixed": "1f255d16ec2d456454fd444494cfb338d62b0fa1"
            }
          ],
          "repo": "https://github.com/marlinfirmware/marlin",
          "type": "GIT"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-129"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/56xxx/CVE-2026-56111.json"
  },
  "details": "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.",
  "id": "CVE-2026-56111",
  "modified": "2026-07-16T03:31:09.376878942Z",
  "published": "2026-06-24T14:31:04.284Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/56xxx/CVE-2026-56111.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-56111"
    },
    {
      "type": "ADVISORY",
      "url": "https://www.vulncheck.com/advisories/marlin-firmware-out-of-bounds-write-via-m421-g-code-handler"
    },
    {
      "type": "REPORT",
      "url": "https://github.com/MarlinFirmware/Marlin/pull/28468"
    },
    {
      "type": "FIX",
      "url": "https://github.com/MarlinFirmware/Marlin/commit/1f255d16ec2d456454fd444494cfb338d62b0fa1"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/MarlinFirmware/Marlin"
    },
    {
      "type": "EVIDENCE",
      "url": "https://github.com/MarlinFirmware/Marlin/issues/28467"
    }
  ],
  "schema_version": "1.8.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Marlin Firmware 2.1.2.7 Out-of-Bounds Write via M421 G-code Handler"
}