Skip to content
RCE Write-up Advanced

Lexmark MC3224adwe RCE exploit

The Lexmark MC3224adwe printer contains an arbitrary file upload, an SSRF, and a command injection vulnerability that can be chained to achieve remote code execution as root. An attacker could upload a payload, use SSRF to reach an internal debugging daemon, and exploit a world-writable FIFO to execute commands.

blasty Follow

Published on github.com

This document details a vulnerability in the Lexmark MC3224adwe printer. This vulnerability was uncovered using static code analysis and verified to be working on the latest available firmware for this device (version CXLBL.081.225 at the time of writing).

blasty (@bl4sty), on github.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the root cause is a combination of missing input validation and access controls: arbitrary file upload without restrictions, SSRF without destination checks, and a world-writable FIFO that passes unsanitised input to a command execution function.

Impact

An attacker could achieve remote code execution as the root user, fully compromising the device.

What the attacker needed

Network access to the printer

How it was found

  1. Upload a privilege escalation payload using the file upload endpoint.
  2. Send two SOAP requests to the internal web service to trigger SSRF callbacks.
  3. Use the SSRF to send a crafted HTTP request to the internal fax debugging daemon on port 12039.
  4. The daemon executes copy file commands that preserve the payload and write malicious input to the FIFO.
  5. The auto-fwdebugd daemon reads the FIFO and executes the injected command, leading to root code execution.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This report describes how a security researcher found multiple weaknesses in a printer. By combining them, an attacker can run their own commands on the printer with the highest privileges, taking full control. The weaknesses include uploading files, tricking the printer into making requests to itself, and injecting commands into a debug pipe.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.