Skip to content
RCE Write-up Advanced

17 vulnerabilities in Sharp Multi-Function Printers

Sharp multifunction printers run a single root super-program whose HTTP stack is vulnerable to a stack-based buffer overflow via an oversized session cookie, allowing unauthenticated remote code execution. The same report lists many other flaws, including an unauthenticated pointer dereference that reboots the device, world-readable coredumps, directory listing, local file inclusion, backdoor access, default credentials, XSS and hardcoded API keys.

Pierre Kim Follow

Published on pierrekim.github.io

Vulnerable versions: 308 different models of Sharp Multi-Function Printers (MFP) are vulnerable. It is recommended to visit the official Sharp advisory and apply security patches and replace unsupported Multi-Function Printers (MFP) models.

Pierre Kim (@PierreKimSec), on pierrekim.github.io

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 an unchecked copy of the MFPSESSIONID cookie into a fixed-size stack buffer in the root-run main program, with no ASLR to hinder exploitation.

Impact

An unauthenticated attacker could execute code as root on the printer and use it to host implants and move laterally; the author did not build a full exploit but Sharp confirmed exploitation is possible.

What the attacker needed

Network access to the printer's web port; no credentials needed

The fix

Sharp issued an advisory with security patches and recommends replacing unsupported models.

How it was found

  1. Send an HTTP request to the printer's web server with an oversized MFPSESSIONID cookie.
  2. Use an existing page such as /main.html if /system.html is absent.
  3. Resend the request if the first attempt does not corrupt the stack.
  4. Confirm the crash in dmesg, where the overwritten value appears in registers.

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.

A multifunction printer is a small computer running Linux, and here one program handles all network services as the all-powerful root user. It copies a cookie value from a web request into a fixed-size memory area without checking the length, so a very long cookie spills over into neighbouring memory and can redirect the program. Because no login is needed, anyone who can reach the printer's web port could take it over.

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.