Skip to main content

Marlin Firmware EUVDEUVD-2026-38797

| CVE-2026-56111 HIGH
Improper Validation of Array Index (CWE-129)
2026-06-24 VulnCheck GHSA-x5qg-qgv8-q7cr
8.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach printer G-code interface (serial/network/file)
  2. Delivery
    Craft M421 with out-of-range I/J indices
  3. Exploit
    Trigger out-of-bounds write past z_values
  4. Execution
    Corrupt adjacent firmware variables
  5. Impact
    Denial of service or firmware state corruption

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Array index validation
Exploitation Conditions

Exploitation requires the firmware to be built with MESH_BED_LEVELING enabled - without that compile-time option the vulnerable M421 handler is not present. The attacker must be able to deliver G-code to the printer through one of: a USB serial connection, an exposed network interface, or a crafted .gcode file the operator prints; per CVSS PR:N no authentication is required on the G-code channel and no user interaction is needed for the serial/network vectors (the malicious-file vector does require an operator to start the print). The decisive limiting factors are reachability of the G-code interface plus the non-default MESH_BED_LEVELING build, captured by AT:P (present attack requirement) in the vector; printers using other bed-leveling modes, or with no exposed serial/network/file ingestion, are not exploitable via this path.

Impact

Signals are largely consistent toward a real, prioritizable issue but bounded by deployment context. The vendor CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:N, VI:H/VA:H, score 8.3) reflects integrity and availability impact with no confidentiality loss and an attack requirement (AT:P) corresponding to the non-default MESH_BED_LEVELING build option. POC is publicly available and the fix is confirmed in commit 1f255d1, reported by VulnCheck. There is no EPSS score, no SSVC decision, and no KEV listing provided, so the probability of widespread automated exploitation is unquantified. The practical attack surface is narrow: most printers are reached over local USB serial, and the AV:N rating is only realistic for the subset exposed via a network interface (network-enabled boards or host gateways) or those that ingest untrusted .gcode files. Note the tension - the vector says AV:N but the most common real-world delivery is local serial or file-based, so for a typical USB-tethered hobby printer the effective vector is closer to local; verify exposure per deployment. Impact is corruption/DoS rather than confirmed remote code execution, though memory corruption on an MPU-less microcontroller could escalate to unpredictable physical machine behavior.

Exploit ScenarioDerived

An attacker who can reach a network-exposed Marlin printer (or who tricks an operator into printing a malicious .gcode file) sends a single 'M421 I<large> J<large> Z<value>' command with grid indices beyond GRID_MAX_POINTS_X/Y. The handler writes the 32-bit float past z_values into adjacent firmware memory, corrupting state and crashing or destabilizing the controller. Given low complexity and publicly available POC, no chaining or special tooling is required once the G-code channel is reachable.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 24, 2026

Out-of-bounds write in Marlin Firmware (3D printer firmware) through 2.1.2.7 lets attackers corrupt firmware memory through the M421 G-code mesh-bed-leveling handler, which fails to upper-bound the X/Y grid indices before writing a 32-bit float into the z_values array. Any actor able to feed G-code to a printer built with MESH_BED_LEVELING enabled can write an attacker-controlled value past the array, overwriting adjacent firmware state and causing denial of service or unpredictable machine behavior. Publicly available exploit code exists and the fix is committed (1f255d1), but there is no public exploit identified as actively exploited in the wild (not in CISA KEV).

RemediationAI

Upstream fix available (PR/commit); a released patched version is not independently confirmed beyond commit 1f255d1, so update to a Marlin build that includes commit 1f255d16ec2d456454fd444494cfb338d62b0fa1 (PR #28468) - i.e., rebuild and reflash from current main or any release tagged after 2.1.2.7 that contains it. If you cannot reflash immediately, the most effective compensating control is to rebuild without MESH_BED_LEVELING (switching to a different leveling mode such as bilinear/UBL) to remove the vulnerable M421 path entirely, accepting the trade-off of losing manual mesh bed leveling. For network-exposed printers, restrict access to the serial/network G-code interface to trusted hosts only and place the printer behind a host controller on an isolated VLAN, which blocks the remote AV:N path but does not stop a locally tethered operator. Finally, do not load untrusted or third-party .gcode files, since a malicious file can carry the crafted M421 command. Reference the VulnCheck advisory (https://www.vulncheck.com/advisories/marlin-firmware-out-of-bounds-write-via-m421-g-code-handler) and issue #28467.

Affected VersionsENISA

Marlin patch: 1f255d16ec2d456454fd444494cfb338d62b0fa1
Marlin 0 ≤2.1.2.7

Affected Packages

euvd marlin no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Marlin is the dominant open-source firmware for 3D printers and other CNC/RepRap-style motion controllers, running on embedded microcontrollers (AVR/ARM) that typically lack memory protection. The flaw is a classic CWE-129 (improper validation of array index): the M421 command sets a mesh bed-leveling point via 'M421 I<x> J<y> Z<value>', and the handler only rejected negative indices (ix < 0 || iy < 0) without checking the upper bounds GRID_MAX_POINTS_X/Y. The patched code replaces this with WITHIN(ix, 0, GRID_MAX_POINTS_X - 1) and WITHIN(iy, 0, GRID_MAX_POINTS_Y - 1), enforcing both ends of the valid range. Because the write target is the fixed-size z_values mesh array, an out-of-range index lets the supplied float land in adjacent firmware variables in RAM. This code path only compiles when MESH_BED_LEVELING is enabled (distinct from the more common AUTO_BED_LEVELING_BILINEAR/UBL paths), consistent with cpe:2.3:a:marlinfirmware:marlin.

Know when Marlin gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 8.3 HIGH
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
vuln.today AI 7.4 HIGH

AC:H reflects the non-default MESH_BED_LEVELING build requirement; PR:N because G-code channels are typically unauthenticated; C:N as only integrity and availability are affected via memory corruption.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

Marlin 3D printer firmware versions through 2.1.2.7 with mesh-bed-leveling enabled are vulnerable to memory corruption via G-code commands, risking production downtime and equipment malfunction in manufacturing and prototyping environments. Public exploit code is available but no active exploitation has been reported in CISA threat databases, providing a mitigation window before potential widespread attacks.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.5%
Top 59% exploitable
Prevalence
Medium
dominant open-source 3D printer firmware, but a specialized maker/industrial domain
Exploit
POC
Public exploit code exists
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

63
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +42
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy