My first serious security vulnerability report
The download function accepted client-controlled absolute file paths, allowing an authenticated user to read arbitrary files from the web server. The attacker could download files outside the intended asset directory, such as system files, though some sensitive files were blocked.
medium.com
Published on medium.com
Hello! I’m new to bug bounty hunting and security research, and this post is about my experience in finding and reporting my first serious security vulnerability for a site listed on openbugbounty.org
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 write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the server did not validate or restrict the file paths supplied in the download request, allowing traversal outside the intended asset directory.
Impact
An authenticated attacker with low privileges could read arbitrary files on the web server, though some sensitive files were blocked with 403 errors.
What the attacker needed
A free account; ability to intercept HTTP requests
The fix
The report does not state the exact fix, but the server should validate and restrict file paths to the intended asset directory.
How it was found
- Create an account and log in to the site.
- Use browser developer tools to find the API endpoint that downloads files.
- Observe that the files parameter uses absolute paths to reference image assets.
- Change the file path in the request to a different file on the server.
- Forward the modified request and download the 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 write-up has not been written yet. The Original tab links to the source.
A website let users download game assets, but it trusted the file path supplied by the user. By changing the path, a logged-in user could make the server send back other files that were never meant to be downloadable. This is called path traversal: using file paths to escape the intended folder.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.