How a Simple “Having Issue?” Feature Opened the Entire Server ?
A file download endpoint lacked authentication and was vulnerable to path traversal, allowing an attacker to read arbitrary files on the server, including Kubernetes service account tokens. This could lead to full remote code execution.
Published on vettrivel007.medium.com
During a freelance Vulnerability Assessment and Penetration Testing (VAPT) engagement, I was tasked with testing a web application belonging to a well-knownbanking platform.
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
The download endpoint did not verify authentication and directly used user-supplied input as a file path without sanitisation, enabling path traversal.
Impact
An attacker could read arbitrary files on the server, including Kubernetes service account tokens, and potentially escalate to full remote code execution.
What the attacker needed
A free user account; ability to upload a file
How it was found
- Log in as a normal user and initiate a fund transfer.
- Click the 'Having Issue?' button and upload a file.
- Observe the response containing a fileUrl with a download endpoint.
- Access the download endpoint directly without authentication to retrieve the uploaded file.
- Modify the fileName parameter to a path traversal payload to read arbitrary files.
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.
The banking app had a feature to upload screenshots when reporting a problem. The server gave back a link to download the file, but anyone could use that link without logging in. Worse, by changing the filename in the link to something like '../../etc/passwd', the server would return any file on the system, including secret tokens that could let an attacker take over the whole server.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.