Skip to content
RCE Advisory Advanced CVE-2023-26067

(Pwn2Own) Lexmark MC3224i lbtraceapp _WriteTarFile Command Injection Privilege Escalation Vulnerability

The _WriteTarFile method in the lbtraceapp component of Lexmark MC3224i printers fails to validate a user-supplied string before passing it to a system call. A local attacker who can already run low-privileged code could exploit this to escalate to root and execute arbitrary code.

pixelindigo Follow

Originally disclosed on Zero Day Initiative

High 7.8 View original

This vulnerability allows local attackers to escalate privileges on affected installations of Lexmark MC3224i printers. An attacker must first obtain the ability to execute low-privileged code on the target system in order to exploit this vulnerability.

pixelindigo, on the Zero Day Initiative

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 report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the _WriteTarFile method builds a shell command from an unvalidated user-supplied string instead of using a safe API or escaping it.

Impact

An attacker with existing low-privileged code execution could escalate to root and run arbitrary code, though the exploit requires that initial foothold.

What the attacker needed

Low-privileged code execution on the printer

The fix

Lexmark issued an update to correct the vulnerability.

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 report has not been written yet. The Original tab links to the source.

A printer runs a small program that builds archive files, and it passes part of a name from the user straight to the operating system's command shell. Because the program does not check that name, someone who can already run a little code on the printer can sneak extra commands in and have them run as the most powerful user, root. This is called command injection, and it only matters here because the attacker must already have a foothold.

What is RCE?

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

More by pixelindigo

View all

1 more disclosed report, best first.

More from Zero Day Initiative

View all

The newest disclosed reports for this program.

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.