Skip to content
Access control Write-up Beginner

From Recon to Full Read/Write DB Access — A Bug Bounty Story

An Adminer database management endpoint was exposed without authentication, redirecting to an already-authenticated session connected to a production database. An attacker could browse, edit, and delete sensitive data including user credentials and PII.

medium.com

Published on medium.com

Cybersecurity

SadInfinite, 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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 4 min read.

Context

The target was a Dutch company in scope on HackerOne. The researcher, SadInfinite, describes the asset as a wildcard scope, and the finding landed on one of the company's main API domains. The exposed component was /adminer, the web front end of Adminer, a database management tool that normally requires a login and password before it will talk to a database.

In a normal deployment, requesting Adminer gives you a login form and nothing else: you supply server, username and password, and only then do you see databases and tables. Here the endpoint behaved differently, and that difference is the whole bug.

Setup

No accounts, credentials or special tooling are described. The work was unauthenticated: the researcher enumerated subdomains of the wildcard scope, checked which hosts were alive, and ran a light fuzz against each one. The only precondition that matters is that the Adminer instance was reachable from the internet on an API host.

Finding it

  1. Enumerate the domains under the wildcard scope.
  2. Determine which of the enumerated hosts were alive.
  3. Run a light content-discovery fuzz on every live domain.
  4. On one of the main API domains, the fuzzing returned a hit on /adminer.

That path name is a strong signal on its own, because it usually means a database management interface is exposed. The interesting part was not that the path existed but how it responded.

Exploitation

Step 1: request the Adminer path

A normal Adminer install answers this with a login form. This one did not. The server replied with a 302 redirect whose target already carried valid connection parameters, so no credentials were ever requested from the visitor.

Step 2: follow the redirect

Following the 302 dropped the researcher straight into an authenticated Adminer session. The session was connected to a production database named real-estate-api, hosted on internal infrastructure. No login step, no password, no interaction of any kind was needed to get there.

Step 3: use the session

From inside that session the researcher could:

  • browse the full list of tables;
  • inspect the schema;
  • read table contents, including a table holding user credentials;
  • edit data.

The report does not include the redirect URL, the parameter names, or the response bodies, so the exact shape of the pre-authenticated connection string is not shown.

Root cause

The endpoint that triggers the database connection was reachable by anyone, and the redirect it returned already carried valid connection parameters. Because the redirect itself carried the connection parameters, the login form was bypassed entirely: authentication was effectively removed from a tool whose only defence is authentication.

The instance sat on an internet-facing API host, and the report does not describe the configuration responsible. The report does not describe the configuration or code responsible, so the precise mechanism is inferred from the observed behaviour.

Impact

The researcher rates this critical, limited only by the maximum severity allowed by the scope. The session gave read and write access to a production database on internal infrastructure. The data reachable included credentials and PII, covering employees of the company and, according to the report, information relating to other company systems. The researcher also states that the data could be edited or deleted.

All of this was available to an anonymous, unauthenticated attacker who could reach the host. The report does not quantify how many records or users were affected.

Fix

It does record the timeline: the issue was triaged in around six hours and resolved in less than 48 hours. What a fix should cover, based on the behaviour described, is removing unauthenticated access to the auto-connecting endpoint, requiring real authentication before any database connection is established, and not exposing a database management interface on a public API host.

Variants to test

  • Adminer and similar DB tools on other hosts. Fuzz for /adminer and comparable paths across every live subdomain. A positive result is any response that is not a plain login form, especially a redirect that lands on a database view.
  • Redirects that carry connection state. Watch for 302 responses from administrative paths whose Location contains server, database or credential parameters. A positive result is following the redirect and arriving at an authenticated interface without submitting anything.
  • Auto-login parameters on management panels. Try the same idea on other tools that support saved connections. A positive result is a session that shows data rather than a login prompt.
  • Wildcard scope coverage. Enumerate and fuzz every host in a wildcard scope rather than only the obvious ones, since the exposed instance here was on an API domain rather than a dedicated admin host.

As the researcher puts it, this is a case of going from recon to a critical finding with a bit of automation and ideas, and content discovery belongs in the recon workflow for exactly this reason.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 10 min read.

What happened, in plain words

A security researcher was testing the websites of a Dutch company through a bug bounty programme on HackerOne. A bug bounty programme is an arrangement where a company invites outside people to look for security problems in its systems and report them, usually in exchange for a reward and permission to do the testing. The researcher's name, as given in the report, is SadInfinite.

The company's scope was a wildcard. A wildcard scope means the programme covers not just one website but every subdomain under a main domain, for example anything ending in the company's domain name. That is a lot of possible targets, so the researcher first made a list of them, checked which ones were actually running, and then tried a small set of common file and folder names against each one. This kind of guessing is called fuzzing.

On one of the company's main API domains, the guessing found a path called /adminer. Adminer is a free tool for managing databases through a web page. Normally you have to type a username and password before it lets you see anything. Here, it did not ask. It sent the visitor straight into a working, logged-in session connected to a production database, meaning the database the company actually uses for real business data, not a test copy. From there the researcher could see the list of tables, look at how they are built, read their contents, including a table of user credentials, and even change the data.

The researcher rated this critical, and the company triaged it in around six hours and fixed it in less than 48 hours. Triaged means the company's security team looked at the report and accepted it as a real issue.

This article walks through the same steps the researcher took, explaining each idea from scratch. You only need to know how to use a browser and a computer to follow it.

The pieces you need to know first

Before the steps make sense, a few everyday concepts need explaining.

A domain and a subdomain. A domain is the main name of a website, like example.com. A subdomain is a name placed in front of it, like api.example.com or shop.example.com. Companies often run many subdomains, each for a different service. Think of the domain as a building's street address and the subdomains as the different departments inside it.

An API. API stands for Application Programming Interface. It is the part of a website built for other software to talk to, rather than for a person clicking around. When a mobile app shows you your orders, it is usually asking an API behind the scenes. An API domain is simply a subdomain dedicated to that kind of traffic. Because APIs are meant for machines, they sometimes get set up with less attention to the human-facing login screens than a normal website would.

A database. A database is an organised store of information. Picture a very large spreadsheet file with many sheets inside it. Each sheet is called a table, and each table has columns (the kinds of information, like name or email) and rows (the individual records). A production database is the live one holding real customer and employee data.

Adminer. Adminer is a small web application that lets someone manage a database from a browser: see the tables, read rows, run queries, edit or delete data. It is a convenient tool for administrators. Its one and only protection is that you must log in with a username and password before it will connect to a database. If that login step can be skipped, the tool becomes an open door to everything inside the database.

A redirect. When you visit a web address, the server can answer with a redirect instead of a page. A redirect is a message saying "the thing you want is over there, go to this other address instead". Your browser follows it automatically, which is why you sometimes land on a different page than the one you typed. The technical name for the redirect message is a 302 status code.

A session. A session is the state of being logged in. When you log in to a website, the server gives your browser a small piece of proof, usually stored in a cookie, and sends it back with every later request so the server knows it is still you. A session that is already authenticated means the server has already accepted that someone is logged in, and will show protected content without asking again.

Credentials and PII. Credentials are the things used to prove identity: usernames, passwords, API keys. PII stands for Personally Identifiable Information: data that can identify a real person, such as names, email addresses, phone numbers or addresses.

Fuzzing and content discovery. Fuzzing, in this context, means sending many requests with different guessed names in the address, one after another, and watching for responses that are not the usual "page not found". Content discovery is the same idea: finding files, folders and pages that exist but are not linked anywhere visible. It is like trying every door handle in a corridor rather than only the doors with signs on them.

Recon. Recon, short for reconnaissance, is the information-gathering phase at the start of a test: finding out what exists before trying to break anything.

The setup

The report describes no accounts, no credentials and no special tools. The whole exercise was unauthenticated, meaning the researcher never logged in anywhere as a legitimate user. The work was:

  1. Enumerate the domains under the wildcard scope. Enumerate means to list them out, one by one, so you know what you are dealing with.
  2. Determine which of those hosts were alive, that is, actually responding on the internet rather than being dead names.
  3. Run a light fuzz on every live domain, trying a modest list of common paths against each.

The only precondition that mattered was that the Adminer instance was reachable from the internet on an API host.

Finding it

The sequence was short:

  1. Determine which of the enumerated hosts were alive.
  2. Run a light content-discovery fuzz on every live domain.
  3. On one of the main API domains, the fuzzing returned a hit on /adminer.

Why do it in this order? Because a wildcard scope can contain dozens or hundreds of names, and most of them may be dead or uninteresting. Listing them first stops you from missing one. Checking which are alive saves you from wasting requests on names that go nowhere. Fuzzing each live host is how you find pages that nobody linked to but that still exist. And /adminer is a strong signal on its own, because that path name usually means a database management interface is sitting there exposed.

The interesting part was not that the path existed. It was how it responded.

Exploitation

Step 1: request the Adminer path

The researcher asked the server for the Adminer page:

Line by line:

  • GET is the method, the verb of the request. It means "give me this thing".
  • /adminer is the path being asked for, the part after the domain name.
  • HTTP/1.1 is the version of the web protocol being spoken.

A normal Adminer installation answers this with a login form and nothing else. This one did not. The server replied with a 302 redirect whose target already carried valid connection parameters. In plain words: instead of showing a login box, the server said "go to this other address", and that other address already contained everything needed to connect to the database. No credentials were ever requested from the visitor.

Step 2: follow the redirect

Following the 302 dropped the researcher straight into an authenticated Adminer session. The session was connected to a production database named real-estate-api, hosted on internal infrastructure. No login step, no password, no interaction of any kind was needed to get there.

Why does this matter so much? Because the login form was the only defence Adminer had. If the redirect itself carries the connection details, the form is bypassed entirely, and authentication has effectively been removed from a tool whose only protection is authentication.

Step 3: use the session

From inside that session the researcher could:

  • browse the full list of tables;
  • inspect the schema, meaning the structure of each table: its columns, their types, and how tables relate to each other;
  • read table contents, including a table holding user credentials;
  • edit data.

The report does not include the redirect URL, the parameter names, or the response bodies, so the exact shape of the pre-authenticated connection string is not shown.

Why it worked

The endpoint that triggers the database connection was reachable by anyone, and the redirect it returned already carried valid connection parameters. The endpoint that triggers that connection was reachable by anyone. Because the redirect itself carried the connection parameters, the login form was bypassed entirely.

The instance sat on an internet-facing API host, and the report does not describe the configuration responsible. The report does not describe the configuration or code responsible, so the precise mechanism is inferred from the observed behaviour.

Impact

The researcher rates this critical, limited only by the maximum severity allowed by the scope. The session gave read and write access to a production database on internal infrastructure. The data reachable included credentials and PII, covering employees of the company and, according to the report, information relating to other company systems. The researcher also states that the data could be edited or deleted.

All of this was available to an anonymous, unauthenticated attacker who could reach the host. The report does not quantify how many records or users were affected.

Fix

It does record the timeline: the issue was triaged in around six hours and resolved in less than 48 hours. What a fix should cover, based on the behaviour described, is removing unauthenticated access to the auto-connecting endpoint, requiring real authentication before any database connection is established, and not exposing a database management interface on a public API host.

Variants to test

  • Adminer and similar DB tools on other hosts. Fuzz for /adminer and comparable paths across every live subdomain. A positive result is any response that is not a plain login form, especially a redirect that lands on a database view.
  • Redirects that carry connection state. Watch for 302 responses from administrative paths whose Location header, the part of the response that says where to go next, contains server, database or credential parameters. A positive result is following the redirect and arriving at an authenticated interface without submitting anything.
  • Auto-login parameters on management panels. Try the same idea on other tools that support saved connections. A positive result is a session that shows data rather than a login prompt.
  • Wildcard scope coverage. Enumerate and fuzz every host in a wildcard scope rather than only the obvious ones, since the exposed instance here was on an API domain rather than a dedicated admin host.

As the researcher puts it, this is a case of going from recon to a critical finding with a bit of automation and ideas, and content discovery belongs in the recon workflow for exactly this reason.

Glossary

  • 302: an HTTP status code meaning the requested thing has moved and the browser should go to another address instead.
  • Adminer: a web-based tool for managing a database from a browser, normally protected by a login form.
  • API: Application Programming Interface, the part of a service built for other software to talk to rather than for people clicking around.
  • Authenticated session: a logged-in state in which the server has already accepted who you are and shows protected content without asking again.
  • Bug bounty programme: an arrangement where a company invites outside researchers to find and report security problems, usually with permission and a reward.
  • Content discovery: finding files, folders and pages that exist on a server but are not linked anywhere visible.
  • Credentials: the things used to prove identity, such as usernames, passwords and API keys.
  • Database: an organised store of information, made of tables with columns and rows.
  • Domain: the main name of a website, such as example.com.
  • Enumerate: to list things out one by one, so you know exactly what you are dealing with.
  • Fuzzing: sending many requests with different guessed names and watching for responses that are not the usual "not found".
  • GET: the HTTP method meaning "give me this thing".
  • HackerOne: a platform where bug bounty programmes are published and reports are submitted.
  • HTTP: the protocol browsers and servers use to exchange requests and responses.
  • Location header: the part of a redirect response that says which address to go to next.
  • PII: Personally Identifiable Information, data that can identify a real person, such as names, emails or phone numbers.
  • Production database: the live database holding real business data, as opposed to a test copy.
  • Recon: reconnaissance, the information-gathering phase at the start of a test.
  • Redirect: a server response telling the browser to go to a different address instead.
  • Schema: the structure of a database: its tables, their columns, types and relationships.
  • Scope: the set of systems a bug bounty programme allows you to test.
  • Subdomain: a name placed in front of a domain, such as api.example.com.
  • Table: one sheet of data inside a database, with columns and rows.
  • Triaged: reviewed and accepted as a real issue by the company's security team.
  • Unauthenticated: done without logging in or proving any identity.
  • Wildcard scope: a scope covering every subdomain under a main domain, not just one named site.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.