Skip to content
Info disclosure Write-up Beginner

From Debug page to Database access

A Laravel debug page on a discovered subdomain exposed database credentials. Using those credentials, the reporter connected directly to the database and could read emails, passwords, cookie values and personal data, and edit configurations.

medium.com

Published on medium.com

Hello guys, I hope everything is well. Today, I will explain how I got access to the database from the debug page.

rood, 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 debug mode was left enabled in production, so the Laravel error page rendered configuration details including database credentials.

Impact

An attacker could read sensitive data such as emails, passwords, cookie values and PII, and could edit configurations in the database.

What the attacker needed

Debug mode left on in production; attacker finds the exposed domain

How it was found

  1. During recon, find a strange domain referenced in the source of a main website.
  2. Open the domain and see a Laravel debug page.
  3. Note the database credentials shown on the debug page.
  4. Connect to the database with a database client using those credentials.
  5. Confirm access and view emails, passwords, cookie values and PII, and edit configurations.

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 debug page is an error or diagnostic screen that developers leave switched on, and it can accidentally show sensitive settings. Here it revealed the username and password for the database, so anyone who found the page could log straight into the database and read or change stored data.

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.