(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.
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.
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.