CVE-2018-1000537

9.8 CRITICAL

📋 TL;DR

This vulnerability in Marlin Firmware allows attackers to execute arbitrary code on 3D printers by sending specially crafted G-Code instructions. It affects Marlin 1.1.x and earlier versions, potentially compromising any 3D printer running vulnerable firmware. The buffer overflow in cardreader.cpp can lead to complete device takeover.

💻 Affected Systems

Products:
  • Marlin Firmware
Versions: 1.1.x and earlier
Operating Systems: Embedded systems running Marlin on 3D printer controllers
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all 3D printers using vulnerable Marlin firmware versions. The specific vulnerable component is cardreader.cpp in certain branches.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of the 3D printer allowing arbitrary code execution, potential physical damage to printer components, and lateral movement to connected systems.

🟠

Likely Case

Printer malfunction, print job sabotage, or unauthorized access to printer controls and settings.

🟢

If Mitigated

Limited to denial of service if network access is restricted and untrusted G-Code is prevented.

🌐 Internet-Facing: MEDIUM - Requires direct access to printer's network interface, but many 3D printers are connected to local networks with limited external exposure.
🏢 Internal Only: HIGH - Within a network, attackers could exploit this to compromise printers and potentially pivot to other systems.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires sending malicious G-Code to the printer, which can be done via USB, SD card, or network connection if enabled.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Fixed in Marlin 1.1.9 and later versions

Vendor Advisory: https://github.com/MarlinFirmware/Marlin/pull/10925

Restart Required: Yes

Instructions:

1. Download latest Marlin firmware from official repository. 2. Compile with appropriate configuration for your printer. 3. Flash firmware to printer controller. 4. Restart printer.

🔧 Temporary Workarounds

Network Isolation

all

Disconnect printer from network or restrict network access to trusted hosts only.

G-Code Validation

all

Implement G-Code validation/sanitization before sending to printer.

🧯 If You Can't Patch

  • Physically isolate printer from network and only use trusted SD cards for print jobs.
  • Implement strict access controls to printer interface and monitor for unusual G-Code commands.

🔍 How to Verify

Check if Vulnerable:

Check Marlin firmware version via printer LCD menu or M115 G-Code command. If version is 1.1.x or earlier, it's vulnerable.

Check Version:

Send M115 G-Code command to printer via serial/USB or check LCD info screen.

Verify Fix Applied:

Verify firmware version is 1.1.9 or later after update. Test with known safe G-Code files.

📡 Detection & Monitoring

Log Indicators:

  • Unusual G-Code commands in printer logs
  • Multiple failed print jobs with corrupted files

Network Indicators:

  • Unexpected network connections to printer port
  • Large G-Code files sent to printer

SIEM Query:

source="printer_logs" AND (gcode="malicious_pattern" OR file_size>threshold)

🔗 References

📤 Share & Export