Skip to content
Path traversal Advisory Intermediate CVE-2021-21879

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.

Matt Wiseman Follow

Originally disclosed on Cisco Talos

Critical 9.9 View original

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.

Matt Wiseman, on Cisco Talos

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

  1. Send an authenticated HTTP POST request to the /fs endpoint with multipart form data.
  2. Set the 'cwd' parameter to a path traversal sequence pointing to the target directory.
  3. Set the 'selectedfile' parameter with a filename matching the target file and include the desired file contents.
  4. The server writes the uploaded content to the path formed by concatenating 'cwd' and the filename, overwriting the target file.
  5. 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.

More by Matt Wiseman

View all

73 more disclosed reports, best first.

More from Cisco Talos

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.