Lantronix PremierWave 2050 Web Manager File Upload directory traversal vulnerability
The Web Manager File Upload function fails to sanitise the 'cwd' parameter, allowing an authenticated user to write files outside the intended directory. An attacker could overwrite executable files such as 'traceroute', leading to arbitrary code execution with root privileges.
Originally disclosed on Cisco Talos
A directory traversal vulnerability exists in the Web Manager File Upload functionality of Lantronix PremierWave 2050 8.9.0.0R4. A specially-crafted HTTP request can lead to arbitrary file overwrite.
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
Impact
An authenticated user could overwrite executable files and achieve arbitrary code execution with root privileges.
What the attacker needed
Authenticated access to the web interface
How it was found
- Send an authenticated HTTP POST request to the /fs endpoint with multipart form data.
- Set the 'cwd' parameter to a path traversal sequence pointing to the target directory.
- Set the 'selectedfile' parameter with a filename matching the target file and include the desired file contents.
- The server writes the uploaded content to the path formed by concatenating 'cwd' and the filename, overwriting the target file.
- Make a subsequent request to the Diagnostics: Traceroute page to execute the overwritten file with root privileges.
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 device lets logged-in users upload files, but it only checks the file name for tricks like '../' that let you escape the upload folder. It forgets to check another part of the request that also controls the destination path. So a user can still write files anywhere, including over system programs, and then trigger those programs to run their own code as the administrator.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.