[██████████] — Directory traversal via `/aerosol-bin/███████/display_directory_████_t.cgi`
A directory listing endpoint accepted a directory path parameter and returned the contents of arbitrary server directories such as /etc and /var. An attacker could browse the whole filesystem and learn about installed libraries and sensitive directories, which might help further compromise the server.
- Triaged in 25 hours
- Fixed in 5 months
- Disclosed after 8 months
Description
On the domain https://█████████, there is a vulnerable endpoint that lets an attacker preview and browse the whole server including all the server's critical directories such as etc , var, cache etc. located in the root directory of this Linux web server.
This vulnerable endpoint is found on many pages across this web app including:
https://www.██████████/aerosol-bin/██████/█████.html_t.cgi?date=20070301
Proof of concept
Please visit the following URLs for the POC:
- https://www.█████████/aerosol-bin/████/display_directory_███_t.cgi?DIR=/etc
███
- https://www.████████/aerosol-bin/████████/display_directory_████████_t.cgi?DIR=/var
█████
- https://www.███/aerosol-bin/█████/display_directory_████_t.cgi?DIR=/var/lib
██████
Fix
To fix this issue, the DIR parameter must be properly validated to show only data in the directories that is supposed to be public and must not go above public folders (public_html) in any case.
Impact
This vulnerability can reveal all the information about the web server including any libraries installed, any sensitive directories, potentially allowing an attacker to leverage this to compromise the web server.
Thanks, Usama
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 DIR parameter was passed to a directory-listing function without validation, so paths outside the public web folder were accepted.
Impact
The endpoint could reveal server information such as installed libraries and sensitive directories, which an attacker could use to help compromise the web server.
What the attacker needed
None
The fix
The DIR parameter should be validated so it only lists directories meant to be public and cannot go above the public web folder.
How it was found
- Open the vulnerable display_directory endpoint on the target domain.
- Set the DIR parameter to /etc to list that directory.
- Set the DIR parameter to /var to list that directory.
- Set the DIR parameter to /var/lib to list that directory.
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 has folders on its disk, like /etc for settings and /var for data. This site had a page that was supposed to show only public files, but it let anyone ask for any folder by changing a value in the address. That means a visitor could see private parts of the server's disk.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.