Skip to content
Info disclosure Write-up Beginner

From an error message to DB disclosure

A PHP file on a subdomain displayed an error message that included a URL to mongolab.com containing an API key. The attacker used that key to access the mLab API and list databases, then accessed sensitive data.

Yumi Follow

Published on medium.com

Welcome on my first write-up. Today, I would like to share a simple but interesting bug I found some months ago on a public program.

Yumi, 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 application exposed a database service API key in a verbose error message.

Impact

The attacker could list databases and access sensitive data through the mLab API.

What the attacker needed

Access to the subdomain; error message reveals API key

The fix

The issue was resolved according to the timeline.

How it was found

  1. Found a PHP file on a subdomain that showed an error message.
  2. Noticed the error contained a URL to mongolab.com with an API key.
  3. Used the API key with the documented mLab API request to list databases.
  4. Explored the API resources to access sensitive data.

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.

An error message on a website accidentally showed a secret key for a database service. The finder used that key to log into the service and read the databases, which should have been private.

What is Info disclosure?

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

More by Yumi

View all

5 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.