Skip to content
Access control Disclosed report Beginner

Google dork lead to unsubscribe anyone from all Banfield emails

An unauthenticated endpoint allowed anyone to unsubscribe any Banfield user from all emails by supplying their email address. A separate endpoint lacked rate limiting, enabling email enumeration.

ractiurd Follow

Originally disclosed on HackerOne

  • Triaged in 4 days
  • Fixed in 46 days
  • Disclosed after 54 days

Summary:

Hi there,

while checking on shodan i found an ip "█████████" which was issued to ███████.

and this was giving me 404 status code. while checking on web archive i found out some link like:

████████

when i did a google search i found out the endpoint for unsubscribe where i can unsubscribe any banfield users from their email without authentication and authorization.

endpoint: ███?EmailAddress██████████████████████████████████

Steps To Reproduce:

[add details for how we can reproduce the issue]

  1. do a google dork site:█████ 1.click on second link and it will direct you to ███████?EmailAddress██████████████████
  2. put authenticated user email and confirm. This will lead to unsubscribe them from banfield emails.

For user enum or email enum this can be done from

POST /Security/SendClientIdMail HTTP/2 Host: █████ Cookie: ████████ User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0 Accept: / Accept-Language: en-US,en;q███████████0.5 Accept-Encoding: gzip, deflate Referer: ████████-Type: application/x-www-form-urlencoded; charset█████████████████utf-8 X-Requested-With: XMLHttpRequest Content-Length: 159 Origin: ███████████ Sec-Fetch-Dest: empty Sec-Fetch-Mode: cors Sec-Fetch-Site: same-origin Te: trailers

__RequestVerificationToken███████████████&email███████████████████████████████&returnUrl█████

On this there is no rate limit so email enum can be done.

Supporting Material/References:

████████████████

  • [attachment / reference]

I added screen shot as a proof of concepts.

Thank you very much. Wish you a good day.

Impact

Can unsubscribe anyone from all Banfield emails

The original report as published on HackerOne, by ractiurd. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

Banfield is a pet healthcare brand, and the Mars program on HackerOne covers its web estate, including *.banfield.com. The feature at the centre of this report is the email unsubscribe flow: a link that lets a recipient opt out of Banfield marketing emails. Normally such a link is tied to a specific subscriber, either through a signed token or through a session that identifies the account, so that one person can only unsubscribe themselves.

The researcher found an unsubscribe endpoint that accepted an email address as a plain parameter and acted on it without authentication or authorisation, meaning anyone who knew a victim's email address could remove that person from all Banfield mailings.

Setup

The work needed no account on the target and no special tooling beyond a browser, a search engine and Shodan. The starting point was an IP address found on Shodan, which the researcher says was issued to a company (both redacted in the report).

Finding it

The researcher began on Shodan, where an IP address belonging to the organisation was listed. Requesting it returned a 404 status code, so the host itself was not serving anything useful at the root.

Turning to the Web Archive, the researcher found archived links of the form shown (redacted) in the report. A Google search on the site then surfaced the unsubscribe endpoint directly. The endpoint took the subscriber's email address as a parameter:

Text
███?EmailAddress██████████████████████████████████

What made this look wrong was that the endpoint was reachable from a search engine, carried the target address in the URL, and, as the next section shows, did not require the caller to be logged in as that subscriber. An unsubscribe action that trusts a user-supplied email address is an access control problem: the only thing standing between an attacker and any subscriber is knowledge of their email address.

Exploitation

Step 1: Find the endpoint with a dork

The researcher did a Google search restricted to the site:

Text
do a google dork site:█████

The report does not describe what the search returned.

Step 2: Follow the indexed link

Clicking the second result directed the browser to a URL of the shape below, with the email address supplied as a query parameter:

Text
███████?EmailAddress██████████████████

The parameter is the whole attack surface here: whatever value is placed in EmailAddress is the account the endpoint acts on.

Step 3: Unsubscribe the victim

With an authenticated user's email address placed in the parameter and the action confirmed, the request unsubscribed that user from Banfield emails. No login as the victim, no token from their inbox and no other proof of ownership was required.

Email enumeration alongside it

The researcher also documented a separate request that can be used for user or email enumeration:

HTTP
POST /Security/SendClientIdMail HTTP/2
Host: █████
Cookie: ████████
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0
Accept: */*
Accept-Language: en-US,en;q███████████0.5
Accept-Encoding: gzip, deflate
Referer: ████████-Type: application/x-www-form-urlencoded; charset█████████████████utf-8
X-Requested-With: XMLHttpRequest
Content-Length: 159
Origin: ███████████
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
Te: trailers

__RequestVerificationToken███████████████&email███████████████████████████████&returnUrl█████

The body carries an ASP.NET-style __RequestVerificationToken anti-forgery field together with email and returnUrl parameters. The researcher notes that the endpoint has no rate limit, so the email parameter can be probed repeatedly to determine which addresses exist. That enumeration is what makes the unsubscribe issue worse in practice: an attacker does not need to guess blindly which addresses are registered, they can confirm them first and then feed the confirmed addresses to the unsubscribe endpoint.

The report says screenshots were attached as proof of concept; the report text itself does not describe what they show.

Root cause

The unsubscribe endpoint keyed its action on an EmailAddress parameter supplied by the caller, and the report shows no authentication or authorisation check tied to that address. In a correct design the unsubscribe link would carry an unguessable, per-recipient token, or the request would be validated against the logged-in session, so that the address in the request must match the identity making it. Here the address alone was sufficient, which is an improper access control issue: the server trusted client-supplied input to decide whose subscription to change.

The enumeration endpoint compounds this. Because POST /Security/SendClientIdMail accepts an email value and has no rate limit, an attacker can build a list of valid subscribers, and the unsubscribe endpoint then turns that list into a mass opt-out. The report does not describe any server-side defence that would have stopped either step.

Impact

As the researcher states, the flaw allows an attacker to unsubscribe anyone from all Banfield emails. The condition is simply that the attacker knows the victim's email address, and the enumeration request described above helps establish which addresses are valid. The effect is on the victim's subscription state, not on their account credentials or data: the report does not claim access to accounts, personal data or the ability to send mail as Banfield. The program rated the issue low severity.

Fix

Based on the flaw, the unsubscribe action should be bound to the recipient rather than to a caller-supplied address: use a per-recipient, unguessable token in the link, or require an authenticated session whose address matches the EmailAddress value, and reject requests where they do not match. The enumeration endpoint should also be rate limited and should not reveal whether an address exists.

Variants to test

  1. Unsubscribe and preference endpoints with an email parameter. Try changing the address in an unsubscribe or mailing-preference URL while logged in as a different user. A positive result is the response confirming the change for the other address, or the other address disappearing from the mailing list.
  2. Indexed action links. Run a site-restricted search for unsubscribe, opt-out and preference paths. A positive result is an indexed URL that performs an action when loaded with a parameter you control.
  3. Enumeration endpoints without rate limits. Send the same existence-check request repeatedly with different addresses and watch for differing responses or timing. A positive result is a reliable yes/no signal for whether an address is registered, with no throttling after many requests.
  4. Archived and forgotten hosts. Check Web Archive and Shodan for hosts that now return 404 at the root but have archived action URLs. A positive result is an old endpoint that still responds and still acts on user-supplied identifiers.

Hunting notes

This bug sits in the unglamorous parts of a site: mailing preference pages, unsubscribe links and the small POST endpoints behind them. They are often built early, rarely revisited, and indexed by search engines because they are linked from every marketing email. During recon, a site-restricted search for words like unsubscribe, optout and preferences is a cheap first pass, and the Web Archive is useful for hosts that no longer serve a root page but still answer on old paths.

The signal that matters is an action endpoint whose only identifier is a value the caller supplies, especially an email address in a query string. The researcher showed the unsubscribe worked for an address the caller did not own, and documented an unthrottled enumeration request. That combination, an unauthenticated state change plus a way to find the targets, is what turns a small access control slip into a report worth filing.

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

Banfield is a pet healthcare brand, and its websites are covered by the Mars bug bounty program on HackerOne. A bug bounty program is an arrangement where a company invites outside researchers to look for security problems in its systems and report them, sometimes for a reward. This report is about one small but real problem in Banfield's email unsubscribe feature.

Almost every marketing email you receive has an unsubscribe link at the bottom. Clicking it tells the company to stop sending you that kind of mail. A well-built unsubscribe link is personal: it contains something unique to you, so the website can be sure that the person clicking is the person who owns the subscription. If the link only contained your email address as plain text, then anyone who knew your email address could build the same link and unsubscribe you. That is exactly what the researcher found here.

The researcher discovered an unsubscribe page that took an email address as a simple part of the web address (a URL parameter) and acted on it without asking the caller to log in or prove they owned that address. In other words, the only thing an attacker needed was the victim's email address. The researcher also found a second request that could be used to check which email addresses are registered, with no limit on how many times it could be called. The report documents both issues, though it does not show them combined.

The report was rated low severity, which reflects that the impact is on people's email subscriptions rather than on their accounts, passwords or personal data. But it is still a genuine access control problem, and it is a good example of how a small overlooked page can have a real effect.

Background: the ideas you need

Before walking through the report, here are the concepts it relies on, explained from scratch.

A URL and its parameters. A URL is the address of a page on the web, like https://example.com/page. Sometimes a URL carries extra information after a question mark, like https://example.com/page?name=alice. The part after the ? is called the query string, and each name=value pair inside it is a parameter. Parameters are a normal way for a website to receive input from the browser. The problem in this report is that one particular parameter, EmailAddress, was trusted too much.

HTTP status codes. When your browser asks a web server for a page, the server replies with a number that says what happened. 200 means "here is the page". 404 means "I do not have anything at this address". 403 means "you are not allowed". These numbers are useful for understanding what a server is doing.

Shodan. Shodan is a search engine for internet-connected devices and servers, rather than for web pages. Security researchers use it to find servers belonging to an organisation, along with information about what those servers are running. It is a reconnaissance tool: it helps you map out what exists before you start testing.

The Web Archive. Also called the Wayback Machine, this is a service that stores snapshots of web pages over time. If a page has disappeared or changed, the archive may still have an old copy. Researchers use it to find pages and links that used to exist but are no longer linked from anywhere obvious.

A Google dork. A dork is a search query that uses special operators to narrow results in a useful way. The most common one for security work is site:, which restricts results to a single domain. For example, site:example.com unsubscribe asks Google to show only pages on example.com that mention "unsubscribe". Dorks are a cheap way to find pages that a site has exposed to search engines, sometimes without meaning to.

Authentication and authorisation. These two words sound similar but mean different things. Authentication is proving who you are, usually by logging in. Authorisation is what you are allowed to do once you are known. A page that requires no login has no authentication. A page that lets you act on someone else's account has an authorisation problem, because it does not check that you are allowed to do that.

Access control. Access control is the set of rules a website uses to decide who can do what. When those rules are missing or wrong, the result is called an improper access control vulnerability. The everyday comparison: a hotel that gives every guest a key to every room has an access control problem, even if the keys look normal.

A cookie. A cookie is a small piece of data that a website stores in your browser and that your browser sends back with every request to that site. Cookies are how websites remember that you are logged in. In the request shown later, the Cookie: header carries the session information.

A token. A token is a value that stands in for something else, usually proof of identity or permission. In an unsubscribe link, a good design uses a long random token unique to each recipient, so that the link cannot be guessed or reused for someone else. In the request shown later, __RequestVerificationToken is a special kind of token used by ASP.NET (a Microsoft web framework) to protect against cross-site request forgery, which is an attack where another website tricks your browser into submitting a form on your behalf.

An API and an endpoint. An API (application programming interface) is the set of addresses and rules a website exposes so that programs, and the browser's own JavaScript, can talk to it. An endpoint is one specific address in that API that does one specific thing, such as "send a confirmation email" or "unsubscribe this address". When you click a button on a modern web page, your browser often sends a request to an endpoint behind the scenes rather than loading a whole new page.

Rate limiting. Rate limiting is a defence where a server refuses to answer the same caller too many times in a short period. Without it, an attacker can send thousands of requests quickly. With it, they are slowed down or blocked. The report notes that one endpoint had no rate limit, which is what made the enumeration possible.

Email enumeration. Enumeration means systematically trying values to find out which ones exist. Email enumeration is using a website's responses to work out which email addresses are registered. A well-designed site gives the same answer whether or not an address exists, so that an attacker learns nothing. A site that answers differently, or that lets you ask unlimited times, leaks that information.

Unsubscribe flow. The unsubscribe flow is the sequence of pages and requests that handle a user opting out of marketing emails. It is usually built early in a product's life, linked from every marketing email, and rarely revisited. That makes it a good place to look for access control mistakes.

Finding it

The researcher started with reconnaissance, which is the phase of security work where you map out what exists before testing anything.

  1. Shodan. The researcher found an IP address on Shodan that was issued to a company. An IP address is the numeric address of a server on the internet. Both the address and the company name are redacted in the report, so we do not know which host this was.
  2. A 404 at the root. Requesting that IP address returned a 404 status code. In plain terms, the server was there but had nothing useful to show at its front page. This is common: a server may host many applications on different paths, and the root may be empty.
  3. The Web Archive. Because the root was empty, the researcher turned to the Web Archive and found archived links of a certain shape. The report shows the shape but redacts the actual URL. The point of this step is that old links can reveal paths that are no longer linked from the live site.
  4. A Google search. A search on the site then surfaced the unsubscribe endpoint directly. This is the key moment: the endpoint was indexed by Google, meaning it was reachable and crawlable, and it took the subscriber's email address as a parameter.

The endpoint looked like this:

Text
███?EmailAddress██████████████████████████████████

Reading this line by line: the part before the ? is the path of the page, redacted here. After the ? comes EmailAddress, which is the name of the parameter. The value that follows is redacted. The important thing is the shape: the page takes an email address in the URL and, as the next section shows, does not check that the caller is that person.

Why did this look wrong? Three reasons. First, the endpoint was reachable from a search engine, so anyone could find it. Second, it carried the target address in the URL, so the address was the only thing identifying whose subscription to change. Third, and most importantly, it did not require the caller to be logged in as that subscriber. An unsubscribe action that trusts a user-supplied email address is an access control problem: the only thing standing between an attacker and any subscriber is knowledge of their email address.

Exploitation

Step 1: Find the endpoint with a dork

The researcher did a Google search restricted to the site:

Text
do a google dork site:█████

Line by line: do a google dork is the researcher's own instruction to themselves, written in the report as a step. site: is the Google operator that restricts results to one domain. The domain itself is redacted. The purpose of this step is to ask Google to list every indexed page on the target site, which is a fast way to find pages that the site owner may not have intended to expose. The report does not describe what the search returned.

Step 2: Follow the indexed link

Clicking the second result directed the browser to a URL of the shape below, with the email address supplied as a query parameter:

Text
███████?EmailAddress██████████████████

Line by line: the path is redacted, then ?EmailAddress names the parameter, and the value is redacted. The parameter is the whole attack surface here. Whatever value is placed in EmailAddress is the account the endpoint acts on. There is no other check, no token from the victim's inbox, and no session requirement.

Step 3: Unsubscribe the victim

With an authenticated user's email address placed in the parameter and the action confirmed, the request unsubscribed that user from Banfield emails. No login as the victim, no token from their inbox and no other proof of ownership was required.

Why does this matter? Because the unsubscribe action is supposed to be personal. In a correct design, the link in the email would contain a long random token unique to that recipient, and the server would check the token before acting. Here, the server trusted the address in the URL. Anyone who knew a victim's email address could build the same URL and unsubscribe them. The everyday comparison: it is like a gym that lets anyone cancel any member's membership just by saying the member's name at the front desk, with no membership card and no ID.

Email enumeration alongside it

The researcher also documented a separate request that can be used for user or email enumeration:

HTTP
POST /Security/SendClientIdMail HTTP/2
Host: █████
Cookie: ████████
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0
Accept: */*
Accept-Language: en-US,en;q███████████0.5
Accept-Encoding: gzip, deflate
Referer: ████████-Type: application/x-www-form-urlencoded; charset█████████████████utf-8
X-Requested-With: XMLHttpRequest
Content-Length: 159
Origin: ███████████
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
Te: trailers

__RequestVerificationToken███████████████&email███████████████████████████████&returnUrl█████

This is a raw HTTP request, which is what your browser sends to a server behind the scenes when you submit a form or click a button. Reading it line by line:

  • POST /Security/SendClientIdMail HTTP/2 is the request line. POST is the method used to send data to the server (as opposed to GET, which asks for a page). /Security/SendClientIdMail is the path of the endpoint. HTTP/2 is the version of the protocol being used.
  • Host: names the server being talked to. It is redacted.
  • Cookie: carries the session information, which is how the server knows who is making the request. It is redacted.
  • User-Agent: identifies the browser and operating system. Here it is Firefox 114 on 64-bit Windows 10.
  • Accept: and Accept-Language: tell the server what kinds of content and languages the browser prefers. The language value is partly redacted.
  • Accept-Encoding: says the browser can accept compressed responses, here gzip and deflate.
  • Referer: tells the server which page the request came from. The value is partly redacted and appears merged with the next header in the report text.
  • X-Requested-With: XMLHttpRequest is a header that JavaScript libraries add to mark a request as an asynchronous one made by the page, rather than a normal page load.
  • Content-Length: 159 says the body of the request is 159 bytes long.
  • Origin: names the site the request is coming from. It is redacted.
  • Sec-Fetch-Dest, Sec-Fetch-Mode, Sec-Fetch-Site are headers modern browsers add to describe the context of the request. Here the destination is empty, the mode is cors (a cross-origin request), and the site is same-origin.
  • Te: trailers says the client can handle trailers, which are extra headers sent after the body.
  • After the blank line comes the body: __RequestVerificationToken, email and returnUrl parameters joined by &. The values are redacted. __RequestVerificationToken is the ASP.NET anti-forgery token mentioned earlier. email is the address being checked. returnUrl is where the server should send the user afterwards.

The body carries an ASP.NET-style __RequestVerificationToken anti-forgery field together with email and returnUrl parameters. The researcher notes that the endpoint has no rate limit, so the email parameter can be probed repeatedly to determine which addresses exist. That enumeration is what makes the unsubscribe issue worse in practice: an attacker does not need to guess blindly which addresses are registered, they can confirm them first and then feed the confirmed addresses to the unsubscribe endpoint.

Why does this matter? Because the two issues combine. On its own, the unsubscribe flaw requires knowing a victim's email address. The enumeration endpoint removes that obstacle by letting an attacker confirm which addresses are real.

The report says screenshots were attached as proof of concept; the report text itself does not describe what they show.

Root cause

The unsubscribe endpoint keyed its action on an EmailAddress parameter supplied by the caller, and the report shows no authentication or authorisation check tied to that address. In a correct design the unsubscribe link would carry an unguessable, per-recipient token, or the request would be validated against the logged-in session, so that the address in the request must match the identity making it. Here the address alone was sufficient, which is an improper access control issue: the server trusted client-supplied input to decide whose subscription to change.

The enumeration endpoint compounds this. Because POST /Security/SendClientIdMail accepts an email value and has no rate limit, an attacker can build a list of valid subscribers, and the unsubscribe endpoint then turns that list into a mass opt-out.

Impact

As the researcher states, the flaw allows an attacker to unsubscribe anyone from all Banfield emails. The condition is simply that the attacker knows the victim's email address, and the enumeration request described above helps establish which addresses are valid. The effect is on the victim's subscription state, not on their account credentials or data: the report does not claim access to accounts, personal data or the ability to send mail as Banfield. The program rated the issue low severity.

Fix

Based on the flaw, the unsubscribe action should be bound to the recipient rather than to a caller-supplied address: use a per-recipient, unguessable token in the link, or require an authenticated session whose address matches the EmailAddress value, and reject requests where they do not match. The enumeration endpoint should also be rate limited and should not reveal whether an address exists.

Variants to test

  1. Unsubscribe and preference endpoints with an email parameter. Try changing the address in an unsubscribe or mailing-preference URL while logged in as a different user. A positive result is the response confirming the change for the other address, or the other address disappearing from the mailing list.
  2. Indexed action links. Run a site-restricted search for unsubscribe, opt-out and preference paths. A positive result is an indexed URL that performs an action when loaded with a parameter you control.
  3. Enumeration endpoints without rate limits. Send the same existence-check request repeatedly with different addresses and watch for differing responses or timing. A positive result is a reliable yes/no signal for whether an address is registered, with no throttling after many requests.
  4. Archived and forgotten hosts. Check Web Archive and Shodan for hosts that now return 404 at the root but have archived action URLs. A positive result is an old endpoint that still responds and still acts on user-supplied identifiers.

Hunting notes

This bug sits in the unglamorous parts of a site: mailing preference pages, unsubscribe links and the small POST endpoints behind them. They are often built early, rarely revisited, and indexed by search engines because they are linked from every marketing email. During recon, a site-restricted search for words like unsubscribe, optout and preferences is a cheap first pass, and the Web Archive is useful for hosts that no longer serve a root page but still answer on old paths.

The signal that matters is an action endpoint whose only identifier is a value the caller supplies, especially an email address in a query string. The researcher showed the unsubscribe worked for an address the caller did not own, and documented an unthrottled enumeration request. That combination, an unauthenticated state change plus a way to find the targets, is what turns a small access control slip into a report worth filing.

Glossary

  • Access control: the rules a website uses to decide who can do what; when they are missing or wrong, the result is an improper access control vulnerability.
  • API (application programming interface): the set of addresses and rules a website exposes so that programs and the browser's JavaScript can talk to it.
  • ASP.NET: a Microsoft web framework; it uses __RequestVerificationToken fields to protect forms against cross-site request forgery.
  • Authentication: proving who you are, usually by logging in.
  • Authorisation: what you are allowed to do once you are known.
  • Bug bounty program: an arrangement where a company invites outside researchers to look for security problems and report them, sometimes for a reward.
  • Cookie: a small piece of data a website stores in your browser and that your browser sends back with every request to that site; used to remember that you are logged in.
  • Cross-site request forgery: an attack where another website tricks your browser into submitting a form on your behalf.
  • Email enumeration: using a website's responses to work out which email addresses are registered.
  • Endpoint: one specific address in an API that does one specific thing.
  • Google dork: a search query that uses special operators, such as site:, to narrow results in a useful way.
  • HTTP status code: a number a server returns to say what happened, such as 200 (here is the page), 404 (nothing here) or 403 (not allowed).
  • IP address: the numeric address of a server on the internet.
  • Parameter: a name=value pair in a URL's query string, used to pass input from the browser to the server.
  • POST: an HTTP method used to send data to the server, as opposed to GET, which asks for a page.
  • Query string: the part of a URL after the ?, containing parameters.
  • Rate limiting: a defence where a server refuses to answer the same caller too many times in a short period.
  • Reconnaissance: the phase of security work where you map out what exists before testing anything.
  • Shodan: a search engine for internet-connected devices and servers, used by researchers to find servers belonging to an organisation.
  • Token: a value that stands in for something else, usually proof of identity or permission; in an unsubscribe link, a long random value unique to each recipient.
  • Unsubscribe flow: the sequence of pages and requests that handle a user opting out of marketing emails.
  • URL: the address of a page on the web.
  • Web Archive (Wayback Machine): a service that stores snapshots of web pages over time, useful for finding pages that used to exist.

More by ractiurd

View all

1 more disclosed report, best first.

More from Mars

View all

The newest disclosed reports for this program.

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.