Skip to content
Info disclosure Disclosed report Beginner

Email addresses exposed in getPersonBySlug API

The getPersonBySlug API method exposed email addresses of users with connected Google accounts because it did not check authorization. An attacker could retrieve these email addresses without permission.

haxta4ok00 Follow

Originally disclosed on HackerOne

Bounty$500incl. $200 bonus Medium View original
  • Triaged in 5 hours
  • Fixed in 9 hours
  • Paid in 25 hours
  • Disclosed after 26 days

Summary by the program

This researcher pointed out that the getPersonBySlug method in the internal API (the API which our frontend code uses to retrieve data from the system) exposed the email addresses of users who had connected Google accounts to their LGTM accounts. Since this API method does not check any authorization, this constituted an unintended disclosure of this data.

An example was provided including the email address of another account.

Semmle fixed the problem by restricting the type of account identifiers that were exposed by this API: the frontend code did not make any use of this information. It was subsequently concluded that this had error had been introduced approximately one month before the date of the report. Affected users have been informed by email.

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

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 5 min read.

What the report shows

The target was the internal API behind LGTM, the code analysis service run by Semmle. This is the API that the frontend code calls to retrieve data from the system, so it is not a public interface but one that the web application relies on.

The researcher found that the getPersonBySlug method in that internal API returned the email addresses of users who had connected Google accounts to their LGTM accounts. The method performed no authorisation check, so anyone able to call it could retrieve this data for accounts other than their own. The report describes this as an unintended disclosure.

To demonstrate the issue, the researcher provided an example that included the email address of another account. The report does not include the request itself, so the exact endpoint path, parameters and response format are not shown here.

Semmle fixed the problem by restricting the type of account identifiers that the API exposed. The frontend code did not use this information, so removing it from the response had no functional cost. The program concluded that the error had been introduced approximately one month before the report was filed, and affected users were informed by email.

The report was rated medium severity and paid a bounty of 500 USD. It was disclosed on 25 March 2019.

Root cause

The root cause is a missing authorisation check on a data retrieval method. Because the method performed no authorisation check, the email address linked to a connected Google account was returned to any caller.

The response also included account identifiers that the frontend did not use. Restricting the exposed identifiers was enough to close the issue, and the frontend did not use this information.

Impact

The report frames the impact as unintended disclosure of email addresses belonging to users who had linked Google accounts. Anyone able to call the method could retrieve the email address of another account. The report does not describe any further use of the data, such as account takeover or phishing, and does not state whether the API was reachable from the public internet or only from within the application's own network path.

How this kind of bug works

This is a broken access control problem, specifically missing object-level authorisation combined with excessive data exposure. APIs that serve a single-page frontend often expose methods that take an identifier and return a record. The frontend is trusted to request only what it needs, but the server does not verify that the caller is allowed to see the record, or that the record should contain the fields being returned.

The bug class appears for two reasons. First, developers treat the internal API as private because only their own code calls it, forgetting that the network path is reachable by anyone who can observe or replay requests. Second, response serialisation is often automatic: the whole model is converted to JSON, so fields added later for other features leak without anyone reviewing the endpoint.

Defences are straightforward in principle: enforce authorisation on every object lookup, return explicit response schemas rather than whole models, and avoid exposing identifiers or contact fields that the client does not consume. Rate limiting and authentication on the internal API reduce the ease of enumeration but do not replace the per-object check.

How to test for it

  1. Map the API surface. Use the frontend application normally with an intercepting proxy and record every call the client makes, paying attention to methods that take an identifier such as a slug, username, numeric ID or UUID.
  2. Create two accounts you control. Populate both with distinguishable data, for example different email addresses on linked third-party accounts.
  3. Call the lookup method as account A but request the identifier belonging to account B. A positive result is a response containing account B's data, particularly fields the frontend does not display.
  4. Repeat without any session at all, and with a session for an unrelated account, to see whether authentication is enforced separately from authorisation.
  5. Inspect responses for fields that are present in JSON but never rendered in the UI. These are the over-fetching candidates, and they are often the actual finding.
  6. Check whether identifiers are guessable or enumerable. Sequential IDs or predictable slugs make bulk collection practical and raise the impact.

Common false positives: the endpoint may return only public profile data that is already visible on the site; the identifier may be a public handle rather than an account secret; or the response may be cached and served identically to all users. Confirm that the data belongs to a different account and is not otherwise public before reporting.

How it is fixed

The standard fix is to add an authorisation check to the lookup method so that the caller can only retrieve records they are entitled to see, and to define an explicit response schema that omits fields the client does not use. In this case the program restricted the type of account identifiers exposed by the API. Where the data is genuinely needed by the frontend, the check should be per object rather than per endpoint. Logging and alerting on unusual enumeration patterns help detect abuse of similar methods.

Hunting notes

These bugs tend to hide in internal or partner APIs that the frontend calls but that are not documented, in GraphQL resolvers that return whole objects, and in older methods kept for backwards compatibility. Recon signals include JavaScript bundles that reference API paths, mobile app traffic that reveals endpoints the web client does not use, and identifiers in URLs that look sequential or human-readable.

To make a report land, show a concrete cross-account retrieval with two accounts you control, redact other users' data, and explain what the leaked field enables. If the program's frontend never uses the field, say so, because it strengthens the case that the exposure is unintended and the fix is cheap.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 7 min read.

What happened, in plain words

LGTM was a code analysis service run by Semmle. It had a website (the frontend) and, behind it, an internal API: a set of programmatic addresses the website calls to fetch data. Think of the frontend as a waiter and the API as the kitchen. You talk to the waiter, the waiter asks the kitchen, and the kitchen sends back a plate. The API is not meant for customers directly, but the frontend calls it to fetch data.

A request is simply a message your browser sends to a server asking for something, and the server's answer is the response. When you load a page, your browser quietly sends many requests in the background, and the page's own code (JavaScript) sends more as you click around.

The researcher found that one method in that internal API, getPersonBySlug, returned the email addresses of users who had connected a Google account to their LGTM account. A method here means a named operation the API offers, like a specific counter at the kitchen. A slug is a short, readable identifier used in place of a number, for example a username-like string in a URL.

The important part is that the method performed no authorisation check. Authorisation is the server asking "are you allowed to see this particular record?", as opposed to authentication, which is "who are you?". The method answered anyone who asked, for any account, not just the caller's own. The program describes this as an unintended disclosure: data that was never meant to be public left the system.

To show it was real, the researcher provided an example that included the email address of another account. The report does not include the request itself, so the exact endpoint path, parameters and response format are not shown here.

Semmle fixed the problem by restricting the type of account identifiers the API exposed. The frontend code did not use this information at all, so removing it from the response broke nothing. The program concluded the error had been introduced about one month before the report, and affected users were informed by email.

The report was rated medium severity and paid a bounty of 500 USD. It was disclosed on 25 March 2019.

Why the bug existed

The root cause is a missing authorisation check on a data retrieval method. Because it performed no authorisation check, the email address linked to a connected Google account was returned to any caller.

The response also included account identifiers that the frontend did not use. Restricting the exposed identifiers was enough to close the issue, and the frontend did not use this information.

What the impact was

The report frames the impact as unintended disclosure of email addresses belonging to users who had linked Google accounts. Anyone able to call the method could retrieve the email address of another account. The report does not describe any further use of the data, such as account takeover or phishing, and does not state whether the API was reachable from the public internet or only from within the application's own network path.

In general, how this kind of bug works

This is a broken access control problem, specifically missing object-level authorisation combined with excessive data exposure. APIs that serve a single-page frontend often expose methods that take an identifier and return a record. The frontend is trusted to request only what it needs, but the server does not verify that the caller is allowed to see the record, or that the record should contain the fields being returned.

The bug class appears for two reasons. First, developers treat the internal API as private because only their own code calls it, forgetting that the network path is reachable by anyone who can observe or replay requests. Second, response serialisation is often automatic: the whole model is converted to JSON, a text format for structured data, so fields added later for other features leak without anyone reviewing the endpoint.

Defences are straightforward in principle: enforce authorisation on every object lookup, return explicit response schemas rather than whole models, and avoid exposing identifiers or contact fields that the client does not consume. Rate limiting and authentication on the internal API reduce the ease of enumeration but do not replace the per-object check.

In general, how to test for it

  1. Map the API surface. Use the frontend application normally with an intercepting proxy, a tool that sits between your browser and the server and records every request, and record every call the client makes. Pay attention to methods that take an identifier such as a slug, username, numeric ID or UUID.
  2. Create two accounts you control. Populate both with distinguishable data, for example different email addresses on linked third-party accounts.
  3. Call the lookup method as account A but request the identifier belonging to account B. A positive result is a response containing account B's data, particularly fields the frontend does not display.
  4. Repeat without any session at all, and with a session for an unrelated account, to see whether authentication is enforced separately from authorisation. A session is the server's memory of you being logged in, usually carried in a cookie, a small piece of data your browser stores and sends back with each request.
  5. Inspect responses for fields that are present in JSON but never rendered in the UI. These are the over-fetching candidates, and they are often the actual finding.
  6. Check whether identifiers are guessable or enumerable. Sequential IDs or predictable slugs make bulk collection practical and raise the impact.

Common false positives: the endpoint may return only public profile data that is already visible on the site; the identifier may be a public handle rather than an account secret; or the response may be cached and served identically to all users. Confirm that the data belongs to a different account and is not otherwise public before reporting.

In general, how it is fixed

The standard fix is to add an authorisation check to the lookup method so that the caller can only retrieve records they are entitled to see, and to define an explicit response schema that omits fields the client does not use. In this case the program restricted the type of account identifiers exposed by the API. Where the data is genuinely needed by the frontend, the check should be per object rather than per endpoint. Logging and alerting on unusual enumeration patterns help detect abuse of similar methods.

In general, where these bugs hide

These bugs tend to hide in internal or partner APIs that the frontend calls but that are not documented, in GraphQL resolvers that return whole objects, and in older methods kept for backwards compatibility. Recon signals include JavaScript bundles that reference API paths, mobile app traffic that reveals endpoints the web client does not use, and identifiers in URLs that look sequential or human-readable.

To make a report land, show a concrete cross-account retrieval with two accounts you control, redact other users' data, and explain what the leaked field enables. If the program's frontend never uses the field, say so, because it strengthens the case that the exposure is unintended and the fix is cheap.

Glossary

  • API: a set of programmatic addresses a program uses to ask another system for data or actions.
  • Frontend: the part of a web application that runs in your browser and displays the interface.
  • Request: a message a browser or program sends to a server asking for something.
  • Response: the server's answer to a request, often containing data.
  • Method: a named operation an API offers, such as a lookup by identifier.
  • Slug: a short, readable identifier used in place of a number, often in a URL.
  • Authentication: proving who you are, for example by logging in.
  • Authorisation: deciding whether an identified user is allowed to access a particular record or action.
  • Broken access control: a flaw where the server fails to enforce who may do or see what.
  • Object-level authorisation: a check that the caller may access this specific record, not just the endpoint in general.
  • Over-fetching / excessive data exposure: returning more fields than the client needs, so sensitive data leaks.
  • Serialisation: converting an internal data object into a format such as JSON for sending.
  • JSON: a text format for structured data, made of names and values.
  • Schema: a definition of which fields a response should contain.
  • Session: the server's memory of you being logged in, usually tracked with a cookie.
  • Cookie: a small piece of data your browser stores for a site and sends back with each request.
  • Intercepting proxy: a tool that sits between your browser and the server and records or modifies traffic.
  • Enumeration: trying identifiers one after another to collect records.
  • UUID: a long, random-looking identifier that is hard to guess.
  • GraphQL resolver: the function in a GraphQL API that produces the data for one field.
  • Rate limiting: restricting how many requests a client may make in a period.
  • False positive: a finding that looks like a bug but is not actually a problem.
  • Severity: a rating of how serious a vulnerability is.
  • Bounty: a payment made by a program for a valid security report.
  • Disclosure: making a security report public.

More by haxta4ok00

View all

32 more disclosed reports, best first.

More from Semmle

View all

The newest disclosed reports for this program.

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.