Skip to content
Info disclosure Write-up Beginner

I Earned $500 in 2 Minutes by Finding a Sensitive File!

An exposed .env file on a test server contained sensitive configuration details such as database credentials and API keys. An attacker who found it could read those secrets and potentially access the underlying systems.

medium.com

Published on medium.com

Ever had one of those moments when a burst of curiosity completely transforms your day? One minute, you’re casually exploring, and the next — you’ve uncovered a hidden sensitive file that not only validates your skills but also earns you a tidy $500 reward!

Krish_cyber, 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 .env file was placed in a web-accessible directory without access restrictions, so the server returned it to anyone who requested it.

Impact

The exposed file could have revealed database credentials and active API keys, which may have allowed access to critical services, although the text describes a test server rather than a confirmed live production system.

What the attacker needed

Authorised test environment; search engine indexing of the file

The fix

The file should be removed from the public web root or blocked by server configuration so it cannot be downloaded.

How it was found

  1. Run search-engine queries to find exposed configuration files.
  2. Identify file paths that suggest misconfiguration.
  3. Fetch the file contents with a command-line tool to confirm it holds sensitive data.
  4. Document the finding and report it to the security team.

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 .env file is a small text file that programs use to store secret settings, such as passwords for databases and keys for other services. If that file is left publicly readable on a web server, anyone who finds the address can download it and learn those secrets. Here the author found such a file using search-engine queries and reported it.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.