Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-56111 — Proof-of-concept exploit for CVE-2026-56111, an out-of-bounds write in the M421 G-code handler of Marlin Firmware, demonstrating constrained memory corruption via crafted G-code commands. | Kitploit
Tools/GitHubGitHub/christbowel/cve-2026-56111
Embedded Systems SecurityVulnerability AnalysisExploitationFuzzingHardware SecurityBinary Exploitation
GitHubchristbowel/cve-2026-56111

CVE-2026-56111

Proof-of-concept exploit for CVE-2026-56111, an out-of-bounds write in the M421 G-code handler of Marlin Firmware, demonstrating constrained memory corruption via crafted G-code commands.

View Repository
1354 months agoNot yet reviewed
Share

CVE-2026-56111 - Marlin M421 Out-of-bounds Write

Proof of concept for CVE-2026-56111, an out-of-bounds write in the M421 G-code handler of Marlin Firmware when built with MESH_BED_LEVELING.

  • Advisory: https://www.vulncheck.com/advisories/marlin-firmware-out-of-bounds-write-via-m421-g-code-handler
  • Affected: Marlin <= 2.1.2.7, fixed in commit 1f255d1
  • Severity: High (CVSS 8.3)

The bug

The MBL M421 handler checks only that the I/J indices are not negative. It never checks the upper bound. set_z() then writes z_values[ix][iy] = z with no bound check. An index past the grid writes a controlled 32-bit float past the z_values array, into adjacent firmware state.

The write is constrained, not arbitrary. The target is z_values + (ix*GRID_Y + iy)*4 bytes, with the indices bounded by int8_t (max 127), so the reachable window is about 2 KB past z_values. You control the value (the Z float) and the offset (the index). You do not control an absolute address.

This tool only sends the G-code line. The out-of-bounds write happens inside the firmware. Observable effects are denial of service, firmware crash, or corrupted motion. The exact memory write is shown in the advisory, not by this tool.

Build

gcc -O2 -o exp exploit.c

Use

Pick one channel:

  • --serial <dev> for USB, e.g. /dev/ttyUSB0 or /dev/ttyACM0 (add --baud N if needed; many boards use 250000)
  • --tcp <host:port> for printers exposing telnet/network gcode, e.g. 192.168.1.50:23

write mode

Send M421 with the index and value you choose:

./exp --serial /dev/ttyUSB0 write -i 3 -j 0 -z 99.0
./exp --tcp 192.168.1.50:23  write -i 5 -j 0 -z 99.0

On a default 3x3 grid (valid index 0..2):

  • -i 3 -j 0 writes at offset 36 bytes, which is z_offset (the bed Z offset)
  • -i 5 -j 0 writes at offset 60 bytes, which is the parser object

dos mode

Send an out-of-range index with a NaN Z value. The NaN propagates into the motion math and reliably crashes or hangs the firmware:

./exp --serial /dev/ttyUSB0 dos
./exp --tcp 192.168.1.50:23  dos

Fix

Update to a Marlin build that includes commit 1f255d1, which bounds the indices the same way the ABL and UBL handlers already do.

Disclaimer

For research and authorized testing only. Use only on devices you own or have explicit permission to test. Sending these commands can crash a printer or disrupt a print.

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    772
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    505
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    420
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    345
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    260
  • 6

    antifox

    antifox-ai/antifox

    AI multi-agent autonomous penetration testing platform that runs recon, attack-surface discovery, exploitation validation and evidence-backed report delivery.

    251

Explore all tools

Browse our collection of tools

View all tools →