Skip to content
Path traversal Advisory Advanced

(Pwn2Own) Lexmark CX331adwe basic_auth.cgi PATH_TRANSLATED Directory Traversal Remote Code Execution Vulnerability

The basic_auth.cgi endpoint on Lexmark CX331adwe printers fails to validate the PATH_TRANSLATED parameter before using it in file operations, allowing directory traversal. A network-adjacent attacker can exploit this to execute arbitrary code as the pagemaker user without authentication.

nella17 Follow

Originally disclosed on Zero Day Initiative

Medium 6.3 View original

This vulnerability allows network-adjacent attackers to execute arbitrary code on affected installations of Lexmark CX331adwe printers. Authentication is not required to exploit this vulnerability.

nella17 (@nella17tw), working with DEVCORE Internship Program, and DEVCORE Research Team, 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 basic_auth.cgi script uses the user-supplied PATH_TRANSLATED value directly in file operations without validating or restricting the path, enabling directory traversal.

Impact

A network-adjacent attacker could execute arbitrary code on the printer as the pagemaker user without authentication.

What the attacker needed

Network-adjacent access to the printer; no authentication required

The fix

The vulnerability was fixed in firmware version CXLBL.230.408.

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.

This printer runs a small web server with a script called basic_auth.cgi. That script takes a value called PATH_TRANSLATED and uses it to decide which file to open, but it does not check whether the value points outside the intended folder. By supplying a crafted value, an attacker on the same network can make the script run their own code on the printer.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

More by nella17

View all

3 more disclosed reports, 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.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.