Skip to content
Access control Write-up Beginner

Two clicks to bypass the entire API

The backend API of BreachDirectory did not validate the RapidAPI proxy secret or restrict traffic to the gateway's IP addresses, so anyone who discovered the origin host could query it directly without an API key. An attacker could bypass all plan limits, billing and logging, and retrieve breach data (usernames and password-related information) without authorisation.

medium.com

Published on medium.com

Bug Bounty

X-3306, 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. 6 min read.

Context

BreachDirectory is a service that lets you check whether a given email address or username has appeared in public data breaches. It is sold through the RapidAPI marketplace, which acts as a gateway in front of the actual backend: the gateway checks the API key, enforces plan limits and handles billing. The entire commercial model rests on one assumption, that every request to the backend goes through that gateway.

The feature at the centre of this story is the RapidAPI test console. It is a helper tool for trying an endpoint from the browser, and its Results > Info panel displayed a host that differed from the proxy host.

Setup

No special tooling was involved. The researcher used the RapidAPI marketplace listing for the BreachDirectory API, the Code Snippets tab and the Test Endpoint function of the test console, and a normal browser. No account details, roles or versions are given beyond that. The precondition for the finding was simply having access to the test console and being able to send a query through it.

Finding it

The researcher wanted to see how the BreachDirectory API works on RapidAPI, so they clicked "Test Endpoint", sent a test query and looked at the results panel.

In the Code Snippets tab everything looked correct. The example code pointed to the RapidAPI proxy host, and a request sent there without a key was rejected, as it should be.

The difference appeared in the test console. After running a query, the Results > Info panel displayed a completely different host in the URL: field:

Text
api.breachdirectory.org/rapidapi-...

That is the origin behind the proxy, not the proxy itself. The console had exposed the backend address that the gateway was supposed to hide.

From the original on medium.com

The image shows the article header for the write-up, titled "Two clicks to bypass the entire API", with the subtitle about a plain RapidAPI test console exposing a backend that never checked who was asking.

Exploitation

Step 1: paste the disclosed host into a browser

The researcher pasted the address from the URL: field into a browser, with no API key and no headers. The response came back instantly. The report shows it as example output containing no sensitive data:

JSON
{"success":true,"found":0,"result":[]}

The server treated the request as fully authorised. There was no 401, no 403 and no CAPTCHA. The server treated the request as fully authorised, with no 401, no 403 and no CAPTCHA.

Step 2: look for a second backend

While verifying, the researcher also found a second backend host, deployed on Render, that behaved exactly the same way. The report does not give that host's address.

Step 3: probe for rate limiting

The researcher ran 6 to 8 manual queries against the direct backend, using popular identifiers and their own test accounts. All of them returned full results, with no slowdown and no HTTP 429. They stopped there because they did not want to put load on production.

Root cause

The origin did not check who was asking at all. It did not validate the X-RapidAPI-Proxy-Secret header, and it did not restrict traffic to the gateway's IP addresses. All the protection existed only on the outside, in a layer that could simply be walked around.

The pattern is trust in a layer nobody verifies:

  1. The backend assumes the gateway will check authorisation.
  2. The gateway assumes the backend is hidden.
  3. The test console knows nothing about either assumption and simply shows the address.

Neither layer is broken on its own. The vulnerability lives in the seam between them, which is why bugs like this rarely show up in unit tests and so easily show up with a single click in the wrong place.

Impact

With the origin reachable directly, all limits and billing disappeared. Traffic going straight to the backend had no key, no plan, no billing and no trace in the marketplace logs. The researcher did not notice any rate limiting on that path during 6 to 8 manual queries.

The data behind it was sensitive: this is a service whose job is to return breach data, meaning usernames and password-related information. The responses are partially censored but still come with a hash and partial information, which in the researcher's view makes recovering the full password a realistic next step.

In the report the researcher estimated the issue at CVSS 8.1 (High), mainly because of confidentiality, while noting that the classification is debatable: returning this kind of data is the entire purpose of the service. The final rating is up to the vendor. The point the researcher stresses is that a very low barrier to entry does not lower the risk; it only lowers the skill needed to exploit it to practically zero.

Fix

The report recommended four measures for the origin:

  1. Validate the proxy secret on the origin.
  2. Allowlist the gateway's IP addresses.
  3. Apply independent rate limiting.
  4. Log requests that arrive without a valid secret.

A few weeks after the report, the researcher checked again and the problem was gone. The test console now shows the correct, protected RapidAPI address, and trying the old endpoint returns unauthorized. The researcher checked once more right before publishing and it was still fine. The exact fix date is unknown; only that the hole is closed.

Reporting and outcome

  1. July 19, 2026: the researcher raised the issue directly in the RapidAPI chat with the provider and received a reply with an email address to send more details to.
  2. July 20, 2026: the full PDF report was sent by email, about an hour after the chat message, just past midnight, under coordinated disclosure with a 90-day window. It contained the description, reproduction steps and recommendations. No further reply was received from that point on, not even an acknowledgment of receipt.
  3. A few weeks later: the direct endpoint returned unauthorized and the test console showed the protected address.
  4. October 21, 2026: checked once more right before publication, still fixed.

Variants to test

If you expose an API through a marketplace, the researcher's own test is the first one to run: hit your backend directly, bypassing the proxy, and see what it answers. If it answers correctly, you have a problem.

  • Direct origin request without credentials. Take the backend host from the test console, as here, and request it with no key and no headers. A positive result is a normal, fully populated response instead of 401 or 403.
  • Proxy secret header omitted or forged. Send the request to the origin without X-RapidAPI-Proxy-Secret, or with an arbitrary value. A positive result is the same successful response in both cases, showing the header is not validated.
  • Source IP outside the gateway range. Send requests from an address that is not one of the marketplace's egress IPs. A positive result is that the origin answers anyway, showing there is no allowlist.
  • Volume check for rate limiting. Send a small number of manual queries and watch for HTTP 429 or slowdowns. A positive result is many full responses with no throttling, as seen here.
  • Diagnostic panels in general. Inspect interface elements that look like "just diagnostics", such as test consoles, debug views and example generators. A positive result is any field that reveals an internal host the public documentation does not mention.

Sometimes the biggest vulnerability is not a complex chain of bugs, but a single field that shows too much.

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. 16 min read.

What happened, in plain words

A security researcher wanted to understand how a service called BreachDirectory works. BreachDirectory is a website that tells you whether an email address or a username has appeared in a public data breach, meaning a leak of account information from some company that got hacked. You can think of it as a lookup desk: you give it a name, and it tells you whether that name shows up in any known leaked lists.

The service is not sold directly. It is sold through a marketplace called RapidAPI. A marketplace here works like a shop counter in front of a warehouse. Customers never walk into the warehouse themselves. They order at the counter, the counter checks their membership card (an API key), counts how many orders they are allowed, and puts the charge on their bill. The warehouse only ever sees orders that came through the counter.

The whole business depends on one assumption: that every request reaches the warehouse through the counter. The researcher found that this assumption was false. By clicking a couple of buttons in a testing tool on the marketplace page, they discovered the warehouse's own address, and that address answered anyone who knocked, with no membership card at all.

There was no clever attack, no special software and no trick. The researcher clicked "Test Endpoint", sent a test query, looked at the results panel, and found an address that should never have been shown. That is the whole story of how it was found. The impact, however, was not small.

The service and the feature involved

BreachDirectory lets you check whether a given email address or username has appeared in public data breaches. It is sold through the RapidAPI marketplace, which acts as a gateway in front of the actual backend. The gateway checks the API key, enforces plan limits and handles billing.

A few words need unpacking here, because the rest of the story depends on them.

  • An API (application programming interface) is a way for one piece of software to talk to another. Instead of a human clicking buttons on a website, a program sends a request to a specific address and gets data back. Think of it as a service window: you pass a request through the window and receive an answer, without going inside the building.
  • The backend (also called the origin) is the actual server that holds the data and does the work. It is the building behind the window.
  • A gateway or proxy is a server that sits in front of the backend and passes requests along to it. It is the receptionist who checks your badge before letting you into the building.
  • An API key is a long string of characters that identifies who you are and which plan you paid for. It works like a membership card: the receptionist looks at it before letting your request through.
  • Billing means charging customers for what they use. The gateway counts requests and turns them into an invoice.

The entire commercial model rests on one assumption: that every request to the backend goes through that gateway. If someone can reach the backend directly, the receptionist is skipped entirely.

The feature at the centre of this story is the RapidAPI test console. It is a helper tool built into the marketplace page that lets you try an endpoint from your browser without writing any code. An endpoint is simply one specific address on a server that does one specific job, like a particular counter in a large office. The test console displays the address it used in its Results > Info panel, a small box on the page that shows details about the request you just made.

Setting up

No special tooling was involved. The researcher used the RapidAPI marketplace listing for the BreachDirectory API, the Code Snippets tab and the Test Endpoint function of the test console, and a normal browser. No account details, roles or versions are given beyond that. The precondition for the finding was simply having access to the test console and being able to send a query through it.

A code snippet is a short piece of example code that a service shows you so you can copy it into your own program. The Code Snippets tab on the marketplace page shows how a correct request should look. The Test Endpoint button runs a request for you, so you can see what comes back without writing anything.

Finding it

The researcher wanted to see how the BreachDirectory API works on RapidAPI, so they clicked "Test Endpoint", sent a test query and looked at the results panel. The goal was simply to understand the service, not to attack it. This is worth noting: the discovery came from ordinary curiosity about how a product behaves.

In the Code Snippets tab everything looked correct. The example code pointed to the RapidAPI proxy host, and a request sent there without a key was rejected, as it should be.

A host is the part of an address that names the server, the equivalent of a building's street address. The proxy host is the receptionist's address, the one customers are supposed to use. When the researcher sent a request to that address without a key, it was rejected, which is exactly the behaviour you want: no membership card, no entry.

The difference appeared in the test console. After running a query, the Results > Info panel displayed a completely different host in the URL: field:

Text
api.breachdirectory.org/rapidapi-...

Line by line, this is what that text means:

  • api.breachdirectory.org is a host name. It is the address of the backend itself, the warehouse, not the receptionist's desk in front.
  • /rapidapi-... is a path on that server. A path is the part of an address after the host that points to a particular resource, like a room number inside the building. The ... stands for the rest of the path, which the report does not spell out.
  • The URL: label is simply the field name in the results panel where this address was shown.

That is the origin behind the proxy, not the proxy itself. The console had exposed the backend address that the gateway was supposed to hide. In other words, the helper tool had printed the warehouse's private entrance on the receipt.

From the original on medium.com

The image shows the article header for the write-up, titled "Two clicks to bypass the entire API", with the subtitle about a plain RapidAPI test console exposing a backend that never checked who was asking.

Exploitation

Step 1: paste the disclosed host into a browser

The researcher pasted the address from the URL: field into a browser, with no API key and no headers. The response came back instantly. The report shows it as example output containing no sensitive data:

JSON
{"success":true,"found":0,"result":[]}

This is JSON, a common text format for data that programs exchange. It is written as pairs of names and values inside curly braces. Line by line:

  • "success":true means the server reports that the request worked. true is a yes.
  • "found":0 means the lookup found zero matches for whatever was searched.
  • "result":[] is an empty list. The square brackets [] mean "nothing inside".

The server treated the request as fully authorised. There was no 401, no 403 and no CAPTCHA.

A header is extra information attached to a request, like a note clipped to a form saying who sent it and in what format. Sending a request "with no headers" means sending it bare, with nothing attached that could identify the sender.

401 and 403 are standard response codes that servers use to say no. A 401 means "you are not identified, please log in". A 403 means "I know who you are, but you are not allowed". A CAPTCHA is the little puzzle that asks you to prove you are human, used to slow down automated requests. None of these appeared. The gateway's key check had been skipped entirely because the request never reached the gateway. The browser had walked straight into the warehouse and the server treated the request as fully authorised.

Step 2: look for a second backend

While verifying, the researcher also found a second backend host, deployed on Render, that behaved exactly the same way. The report does not give that host's address.

Render is a hosting company, a place where people rent servers to run their applications. Finding a second server with the same weakness matters because the same gap existed on more than one host.

Step 3: probe for rate limiting

The researcher ran 6 to 8 manual queries against the direct backend, using popular identifiers and their own test accounts. All of them returned full results, with no slowdown and no HTTP 429. They stopped there because they did not want to put load on production.

Rate limiting is a cap on how many requests a server will accept in a period of time, like a shop that only lets ten people in per minute. It exists to stop abuse and to keep the service fast for everyone. HTTP 429 is the standard response code that means "too many requests, slow down".

A production system is the live service that real customers use, as opposed to a test copy. The researcher deliberately kept the number of queries small so as not to disturb real users. This is a normal courtesy in security research: prove the point, then stop.

Root cause

The origin did not check who was asking at all. It did not validate the X-RapidAPI-Proxy-Secret header, and it did not restrict traffic to the gateway's IP addresses. All the protection existed only on the outside, in a layer that could simply be walked around.

Two more terms to explain:

  • X-RapidAPI-Proxy-Secret is the name of a header that the gateway is supposed to add to every request it forwards. It is a shared secret, a password that only the gateway and the backend know. If the backend checks it, then any request without it can be assumed to have come from somewhere else. The name starts with X- because that is a common convention for custom headers that are not part of the standard.
  • An IP address is the numeric address of a computer on a network, the equivalent of a postal address for a machine. Restricting traffic to the gateway's IP addresses means the backend only answers machines it recognises as the gateway.

Neither check was in place. The backend answered anyone.

The pattern is trust in a layer nobody verifies:

  1. The backend assumes the gateway will check authorisation.
  2. The gateway assumes the backend is hidden.
  3. The test console knows nothing about either assumption and simply shows the address.

Neither layer is broken on its own. The vulnerability lives in the seam between them, which is why bugs like this rarely show up in unit tests and so easily show up with a single click in the wrong place.

A unit test is an automated check that a programmer writes to confirm one small piece of code behaves correctly. Unit tests look at each piece in isolation, so a gap between two pieces, where each one trusts the other, is exactly what they tend to miss.

Impact

With the origin reachable directly, all limits and billing disappeared. Traffic going straight to the backend had no key, no plan, no billing and no trace in the marketplace logs. The researcher noticed no rate limiting on that path.

Logs are records that a system keeps of what happened, like a visitor book at a building entrance. Requests that skip the gateway leave no entry in the marketplace's visitor book, so the marketplace owner cannot see them at all.

The data behind it was sensitive: this is a service whose job is to return breach data, meaning usernames and password-related information. The responses are partially censored but still come with a hash and partial information, which in the researcher's view makes recovering the full password a realistic next step.

A hash is the result of running a password through a mathematical function that turns it into a fixed-length string. It is designed to be one-way: you cannot read the password back out of the hash directly. However, if you have a hash and some partial clues, you can try candidate passwords, hash each one and compare. That is why a hash is still sensitive.

In the report the researcher estimated the issue at CVSS 8.1 (High), mainly because of confidentiality, while noting that the classification is debatable: returning this kind of data is the entire purpose of the service. The final rating is up to the vendor.

CVSS stands for Common Vulnerability Scoring System. It is a standard way of giving a security flaw a score from 0 to 10 so that everyone describes severity in the same units. Confidentiality here means keeping data away from people who should not see it. The researcher's point is that a very low barrier to entry does not lower the risk; it only lowers the skill needed to exploit it to practically zero.

Fix

The report recommended four measures for the origin:

  1. Validate the proxy secret on the origin. In plain terms: check the shared password on every request and refuse the ones that do not have it.
  2. Allowlist the gateway's IP addresses. An allowlist is a list of things that are permitted, with everything else refused by default. Here it means only answering the gateway's known machines.
  3. Apply independent rate limiting. The backend should have its own cap on requests, not rely on the gateway's.
  4. Log requests that arrive without a valid secret. Recording these attempts means the owner can see when someone is knocking on the back door.

A few weeks after the report, the researcher checked again and the problem was gone. The test console now shows the correct, protected RapidAPI address, and trying the old endpoint returns unauthorized. The researcher checked once more right before publishing and it was still fine. The exact fix date is unknown; only that the hole is closed.

Reporting and outcome

  1. July 19, 2026: the researcher raised the issue directly in the RapidAPI chat with the provider and received a reply with an email address to send more details to.
  2. July 20, 2026: the full PDF report was sent by email, about an hour after the chat message, just past midnight, under coordinated disclosure with a 90-day window. It contained the description, reproduction steps and recommendations. No further reply was received from that point on, not even an acknowledgment of receipt.

Coordinated disclosure is the practice of telling the owner of a system about a flaw privately, giving them time to fix it before you tell anyone else. A 90-day window is a common deadline: the researcher says, in effect, "I will keep this quiet for 90 days while you fix it". Reproduction steps are the exact instructions someone else can follow to see the same problem for themselves.

  1. A few weeks later: the direct endpoint returned unauthorized and the test console showed the protected address.
  2. October 21, 2026: checked once more right before publication, still fixed.

Variants to test

If you expose an API through a marketplace, the researcher's own test is the first one to run: hit your backend directly, bypassing the proxy, and see what it answers. If it answers correctly, you have a problem.

  • Direct origin request without credentials. Take the backend host from the test console, as here, and request it with no key and no headers. A positive result is a normal, fully populated response instead of 401 or 403. An SDK is a set of ready-made code a company gives developers so they can use its service easily. A JavaScript bundle is the collection of code a website sends to your browser to make the page work, and it can sometimes contain addresses the site uses behind the scenes.
  • Proxy secret header omitted or forged. Send the request to the origin without X-RapidAPI-Proxy-Secret, or with an arbitrary value. A positive result is the same successful response in both cases, showing the header is not validated. Forged here means made up, an invented value rather than the real secret.
  • Source IP outside the gateway range. Send requests from an address that is not one of the marketplace's egress IPs. A positive result is that the origin answers anyway, showing there is no allowlist. Egress means outgoing traffic, the addresses a system uses when it sends requests out.
  • Volume check for rate limiting. Send a small number of manual queries and watch for HTTP 429 or slowdowns. A positive result is many full responses with no throttling, as seen here.
  • Diagnostic panels in general. Inspect interface elements that look like "just diagnostics", such as test consoles, debug views and example generators. A positive result is any field that reveals an internal host the public documentation does not mention. A parameter is a named value you pass along with a request, like a field on a form.

Sometimes the biggest vulnerability is not a complex chain of bugs, but a single field that shows too much.

Glossary

  • API: a way for one piece of software to talk to another, sending requests to specific addresses and receiving data back.
  • API key: a long string of characters that identifies a customer and their plan, used like a membership card.
  • Allowlist: a list of things that are permitted, with everything else refused by default.
  • Backend (origin): the actual server that holds the data and does the work, behind any gateway.
  • Billing: charging customers for what they use, here counting requests and turning them into an invoice.
  • CAPTCHA: a small puzzle used to prove a request comes from a human and not an automated program.
  • Code snippet: a short piece of example code showing how to use a service.
  • Confidentiality: keeping data away from people who should not see it.
  • Coordinated disclosure: telling the owner of a system about a flaw privately and giving them time to fix it before anyone else is told.
  • CVSS: Common Vulnerability Scoring System, a standard 0 to 10 score for the severity of a security flaw.
  • Egress: outgoing traffic, the addresses a system uses when it sends requests out.
  • Endpoint: one specific address on a server that performs one specific job.
  • Forged: made up, an invented value rather than the real one.
  • Gateway (proxy): a server that sits in front of a backend, checks requests and passes them along.
  • Hash: the fixed-length result of running data such as a password through a one-way mathematical function, designed so the original cannot be read back directly.
  • Header: extra information attached to a request, such as who sent it or in what format.
  • Host: the part of an address that names the server, like a street address for a building.
  • HTTP 401: the response code meaning the sender is not identified, please log in.
  • HTTP 403: the response code meaning the sender is identified but not allowed.
  • HTTP 429: the response code meaning too many requests, slow down.
  • IP address: the numeric address of a computer on a network.
  • JavaScript bundle: the collection of code a website sends to your browser, which can sometimes contain internal addresses.
  • JSON: a common text format for exchanging data, written as names and values inside curly braces.
  • Logs: records a system keeps of what happened, like a visitor book.
  • Parameter: a named value passed along with a request, like a field on a form.
  • Path: the part of an address after the host that points to a particular resource, like a room number.
  • Production: the live system that real customers use, as opposed to a test copy.
  • Rate limiting: a cap on how many requests a server accepts in a period of time.
  • Render: a hosting company where people rent servers to run their applications.
  • Reproduction steps: exact instructions someone else can follow to see the same problem.
  • SDK: a set of ready-made code a company gives developers so they can use its service easily.
  • Unit test: an automated check that one small piece of code behaves correctly, in isolation from the rest.
  • X-RapidAPI-Proxy-Secret: the name of a header carrying a shared secret that the gateway adds to forwarded requests so the backend can confirm they came through it.
  • 90-day window: a common deadline in coordinated disclosure, giving the owner 90 days to fix a flaw before it is made public.

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.