Milesight UR32L luci2-io file-export mib directory traversal vulnerability
The file-export CGI endpoint in Milesight UR32L v32.3.0.5 fails to sanitise the 'file' parameter, allowing directory traversal. An authenticated attacker can read arbitrary files on the device.
Originally disclosed on Cisco Talos
A directory traversal vulnerability exists in the luci2-io file-export mib functionality of Milesight UR32L v32.3.0.5. A specially crafted network request can lead to arbitrary file read.
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
The 'file' parameter is concatenated to a base directory without sanitising path traversal sequences, allowing access to files outside the intended directory.
Impact
An authenticated attacker could read arbitrary files on the device, potentially exposing sensitive information.
What the attacker needed
Valid session ID (authenticated user)
How it was found
- Send a request to the cgi-bin/file-export endpoint with a valid session ID.
- Set the 'type' parameter to 'mib'.
- Set the 'file' parameter to a path traversal sequence that points to the target file.
- The server reads and returns the contents of the requested file.
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 router has a web page that lets you download configuration files. The code that builds the file path does not check for '..' sequences, so you can trick it into reading any file on the system, not just the intended ones. An attacker who can log in could steal sensitive files like password hashes or configuration data.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.