Skip to content
Path traversal Write-up Intermediate

That One Time a Forgotten Endpoint Earned Me $$$

A legacy API endpoint accepted a file path parameter without authentication and was vulnerable to path traversal, allowing arbitrary file reads. The attacker could read server logs and a configuration file containing hardcoded AWS access keys, which had broad cloud permissions.

dhirenkumar Follow

Published on medium.com

It was a Tuesday night, sometime past midnight, and I was in that familiar state of hacker flow. Burp Suite was humming in the background, Spotify quietly looping lofi beats, and a half-drunk mug of coffee going cold beside me.

Dhiren Kumar Pradhan, on medium.com

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 legacy reporting endpoint failed to normalise and restrict the user-supplied file path, and it also stored cloud credentials in a readable configuration file.

Impact

An attacker could read arbitrary files and use the exposed AWS keys to access S3 buckets and EC2 actions, potentially exfiltrating data or abusing cloud infrastructure.

What the attacker needed

Internet access to the legacy endpoint; no authentication required

How it was found

  1. Find the legacy API subdomain during recon.
  2. Send a POST request to the reporting endpoint and observe it accepts a file path parameter.
  3. Trigger an error that reveals the full server path.
  4. Use double URL encoding to bypass filtering and read files outside the intended directory.
  5. Read server logs and a configuration file containing AWS keys.
  6. Confirm the keys with a read-only AWS identity call.

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 forgotten old web service let anyone ask for files on the server by giving a path that climbed out of the intended folder. That mistake is called path traversal. Because a settings file with cloud login keys was on the same server, the attacker could also reach the company's cloud storage and servers.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

More by dhirenkumar

View all

3 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.