Skip to content
Info disclosure Write-up Beginner

Real Findings Exposed Backup Files 1

A backup copy of a Drupal configuration file was left in the web root and served as plain text, exposing production database credentials. An attacker could use these credentials to connect directly to the database and read or modify data.

exz Follow

Published on systemweakness.com

During routine reconnaissance, a GET request to a predictable configuration backup path returned a 200 OK response containing a plaintext PHP configuration file. The exposed file contained full production database credentials, including the database name, username, password, host endpoint, and port.

exz, on systemweakness.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, a backup copy of the configuration file was left in the web root and the server was not configured to block access to files with a .bak extension.

Impact

The exposed credentials could allow an attacker to connect directly to the production database and dump, modify, or delete data, potentially pivoting to other internal services.

What the attacker needed

Backup file left in web root; server does not block .bak extension; no authentication required

The fix

The text does not state that the issue was fixed; it recommends removing backup files from the web root, blocking sensitive extensions at the server level, rotating credentials, using environment variables or a secrets manager, and adding backup file checks to the deployment pipeline.

How it was found

  1. Request the known configuration file path with a .bak extension appended.
  2. Observe that the server returns the file contents as plain text with a 200 OK response.

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's configuration file often holds the password to its database. Here, someone made a backup copy of that file and left it in a public folder. The web server handed the backup to anyone who asked, so the database password was exposed.

What is Info disclosure?

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

More by exz

View all

4 more disclosed reports, best first.

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.