Skip to content
Info disclosure Disclosed report Beginner

Information Disclosure Due To exposed .env file (Directory Listing) at ████████

A .env file was publicly accessible on the server, exposing application configuration including database and email credentials. An attacker could use these secrets to access the database or email services.

necr0mancer Follow

Originally disclosed on HackerOne

High 7.5 View original
  • Disclosed after 6 days

A .env file was discovered on the server at ████, exposing sensitive application configurations, including database credentials, email settings, and more. This information could allow an attacker to gain unauthorized access to critical systems and services.

Steps to Reproduce:

  1. Open a web browser.
  2. Navigate to ████████.
  3. The .env file content is displayed, revealing sensitive information.

PoC Video Link: ██████

Impact

The exposed .env file could lead to multiple security threats, including but not limited to:

Unauthorized database access using DB_HOST, DB_USERNAME, and DB_PASSWORD. Compromise of email services via MAIL_USERNAME and MAIL_PASSWORD. Ability to access or manipulate other connected services.

The original report as published on HackerOne, by necr0mancer. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 web server was misconfigured to serve dotfiles or the .env file was placed in a publicly accessible directory without access restrictions.

Impact

The exposed credentials could allow unauthorised database access, compromise of email services, and access to other connected services.

What the attacker needed

None

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 .env file is a plain text file that stores secret settings for an application, such as database passwords. If it is left on a public web server, anyone who guesses the file name can read those secrets. Here the file was reachable directly in a browser, so the secrets were exposed.

What is Info disclosure?

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

More from AWS VDP

View all

The newest disclosed reports for this program.

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.