Unauthenticated Full User Directory PII Dump — 103K+ Records Exposed
An unauthenticated API endpoint under an /open/ path returned the entire user directory when a publicly discoverable tenant header was supplied. An attacker could retrieve over 103,000 user records including email addresses, roles, and device registrations without any authentication.
Published on medium.com
One of the most important lessons I’ve learned while testing modern web applications is that an endpoint returning 400 Bad Request is not necessarily an endpoint that is protected.
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.
Context
The target was an identity service sitting behind an API gateway, reached through a path structure the researcher describes as /unifyd-gateway/api/unifydidentity/. Within that namespace, one prefix stood out: /open/. The application legitimately exposes public endpoints under such a prefix, for example /open/login, /open/config, /open/health and /open/metadata, so the prefix alone proves nothing. The question the researcher kept asking was what functionality is actually reachable under the supposedly open namespace.
The answer was a collection endpoint:
GET /unifyd-gateway/api/unifydidentity/open/users
A /users collection endpoint is interesting because a single authorization mistake there can expose every object in the collection rather than one record. In this case the endpoint returned the raw identity entity, including institutional email addresses, internal database identifiers, organisational roles, last-login timestamps and push-notification device registrations, for more than 103,000 users.
The researcher frames the architecture as a browser talking to a CDN or reverse proxy, then an API gateway that handles authentication, routing and authorization, then microservices including an identity service, a user service and a notification service. The bug lives at the boundary between the gateway and the identity backend.
Setup
No account, session, cookie or bearer token was needed for the successful request. The only precondition was knowing the tenant-routing value, which the researcher found to be publicly discoverable through client-side application resources. The report does not name the tools used for reconnaissance or for capturing the response.
The researcher's working assumptions were:
- Do not think only about what the frontend allows.
- Ask which APIs the application uses, which services sit behind the gateway, which routes are authenticated, which are intentionally public, what happens when the API is called directly, and what the server actually uses to make its authorization decision.
Finding it
Reconnaissance turned up the identity API structure and then the /open/ namespace. The researcher lists the kinds of endpoints that are legitimately public under such a prefix:
/open/login
/open/config
/open/health
/open/metadata
Seeing /open/ is not a finding. The collection endpoint underneath it was. The first request to it, sent without the expected tenant-routing information, returned:
HTTP/1.1 400 Bad Request
The easy conclusion would have been that the endpoint is protected. The researcher rejected that conclusion because a 400 does not normally mean "you are not authenticated"; it means the server rejected something about the request itself. The question changed from "is this endpoint protected?" to "what condition causes the server to return 400?".
Exploitation
Step 1: identify the routing header
The API required a tenant-routing header:
x-tenant-id: mymohawkcollegeu8
The next task was to decide whether that value was an authentication secret or simply a routing selector. The researcher found the tenant identifier was not a secret credential: it was publicly discoverable through client-side application resources, so an external user could determine the correct value without an account. The request flow the researcher describes is an attacker supplying x-tenant-id, the gateway routing the request to the tenant, and the identity API then reaching the user repository without an authentication check.
Step 2: differential testing across authentication states
Rather than trusting a single request, the researcher tested several combinations of tenant header and authentication. The matrix was:
| Request | Result |
|---|---|
| Tenant header only | 200 OK, full directory returned |
| Tenant header + invalid bearer | 200 OK, full directory returned |
| Valid bearer without tenant header | 400, routing failure |
| No headers | 400, routing failure |
The decisive comparison is that no authentication plus correct tenant routing yields 200 OK, while authentication with missing tenant routing yields 400. An invalid bearer token changed nothing. That is strong evidence the tenant header participates in routing, not authorization.
Step 3: minimal proof of concept
The vulnerable request needed only two headers:
GET /unifyd-gateway/api/unifydidentity/open/users HTTP/1.1
Host: target.example
x-tenant-id: mymohawkcollegeu8
There was no Authorization: Bearer ..., no session cookie, no authenticated account and no CSRF token. The server answered:
HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
The body contained user records directly. That established the authentication bypass; the next question was how much data was exposed.
Step 4: inspect the returned entity
The response was not a minimal public directory. Individual records looked like this:
{
"id": "...",
"firstName": "...",
"lastName": "...",
"role": [
"AADStudents",
"AllUsers",
"Public"
],
"secondaryEmail": "...",
"tenant": "...",
"email": "...",
"channels": [
"email",
"push"
],
"lastlogindate": "...",
"devices": [
{
"type": "Android",
"id": "..."
}
]
}
The researcher contrasts the intended public representation, which might have contained only a name and a department, with what the API actually returned: internal ID, name, email, secondary email, roles, login timestamp, device registrations and other metadata. Returning the database entity rather than a designed public view is what turns an authorization failure into a serious disclosure.
Step 5: recognise the repository pattern
The behaviour was consistent with a Spring Data REST-style repository exposure. The researcher is careful about the framing: the question is not whether Spring Data REST is vulnerable, because it is not necessarily, but whether a sensitive repository was unintentionally made reachable without the authorization controls that should protect it. The effective architecture becomes database, repository, Spring Data REST, gateway, internet.
Step 6: measure the scale
The endpoint returned the entire collection rather than requiring individual user identifiers. The captured response contained approximately:
103,349 user records
with approximately:
103,262 distinct institutional email addresses
The complete response was approximately:
116 MB
and was streamed using chunked transfer encoding. That moved the finding from unauthenticated access to user information to unauthenticated mass disclosure of the entire user directory, which changes the severity assessment.
Step 7: device registrations
The dataset also contained device registration information. Approximately:
28,556
push-notification device registrations were observed, with device types and token-like identifiers associated with push infrastructure, including Android, iOS and web registrations. The researcher did not attempt to use the tokens, because the unauthorised exposure itself was sufficient to demonstrate impact. The stated principle is not to escalate an already-proven vulnerability simply to make the report more dramatic, since further exploitation of exposed credentials or security-sensitive identifiers creates unnecessary risk.
Step 8: privileged staff roles
The dataset contained organisational roles. Examples included roles associated with:
Human Resources
Finance
Financial Assistance
Registration
Approximately twenty distinct privileged or editor-style role categories were observed. That lets an attacker distinguish general users from users associated with sensitive organisational functions. Instead of only an address such as [redacted], an attacker could hold a name, institutional email, organisational role and last login, which makes targeted phishing and social engineering more convincing and produces a valuable reconnaissance dataset.
Step 9: deliberate limits
Because the endpoint exposed real user information, testing was intentionally limited. The researcher did not:
- attempt to log into other accounts;
- attempt password resets;
- attempt account takeover;
- attempt to send push notifications;
- attempt to use exposed device tokens;
- modify user records;
- delete or change data;
- contact exposed users;
- perform credential stuffing;
- attempt destructive actions.
The objective was to demonstrate unauthenticated access, sensitive information and mass extraction, which was already sufficient. Responsible disclosure matters especially when a large population of real users is involved.
Root cause
The apparent root cause was an authorization boundary failure involving the gateway's /open/ route. The apparent root cause was an authorization boundary failure involving the gateway's /open/ route: the tenant header was used for routing only, so a publicly discoverable tenant value was enough to reach the identity API and its user repository. The tenant header was used for routing only, so supplying a publicly discoverable tenant value was enough to reach the backend.
The dangerous combination was:
Publicly reachable route
+
Authentication bypass
+
Raw identity repository
+
Collection endpoint
The 400 responses were routing validation failures, not authorization barriers. The researcher's diagram of the behaviour is: if the tenant header is absent, return 400; if present, continue processing; if authentication is not enforced, return 200 OK. An invalid bearer token produced the same result as no token at all, which strongly indicated that authentication was not part of the authorization decision for this route.
Impact
The exposed data covered the entire user directory of the tenant: more than 103,000 user records, approximately 103,262 distinct institutional email addresses, internal database identifiers, organisational roles, last-login timestamps and approximately 28,556 push-notification device registrations. No account, session, cookie or bearer token was required, and the collection endpoint allowed automated collection of the whole dataset in one response of roughly 116 MB.
The researcher lists potential abuse, hedged as potential consequences that need not be performed to establish the vulnerability:
- Targeted phishing. Real names combined with real institutional email addresses make campaigns more convincing.
- Staff targeting. Role information helps identify employees in sensitive departments.
- Organisational reconnaissance. The attacker receives a large pre-built directory instead of discovering employees individually.
- Push infrastructure exposure. Device-registration information adds another security-sensitive category to the disclosure.
The difference between accessing one user's profile and accessing the entire directory is the difference between a single record and a dataset that can be collected automatically into an attacker database of names, emails, roles, timestamps and device registrations.
Fix
The report sets out remediation as recommendations; it does not describe changes that were made.
- Enforce authentication. The user collection endpoint should require authentication, enforced independently of the tenant-routing mechanism.
- Enforce authorization. Authentication alone is not enough; the application should verify that the authenticated user is authorised to access the requested tenant and resource. The flow should be: authenticate user, determine tenant, authorise requested resource, return only permitted data.
- Audit
/open/routes. If the gateway treats/open/*as unauthenticated, every endpoint under that namespace should be reviewed, because fixing one endpoint may leave other sensitive APIs exposed. - Avoid raw repository exposure. Sensitive persistence entities should not be automatically exposed to the internet. Prefer explicit DTOs, for example:
class PublicUser:
first_name: str
last_name: str
and control explicitly which fields are exposed. 5. Remove sensitive fields. Internal database IDs, secondary email, device registrations, push tokens and internal role metadata should not appear in an unauthenticated directory response. 6. Implement pagination and limits. Even authenticated APIs should use pagination, a maximum page size, rate limiting and abuse detection. This does not replace authorization but reduces the impact of accidental bulk exposure. 7. Rotate exposed device registrations. Because push-registration identifiers were exposed, affected registrations should be evaluated and rotated or invalidated where appropriate.
Variants to test
The report closes with a repeatable methodology. Each step below is a concrete thing to try elsewhere, with what a positive result looks like.
- Map the application. Look in JavaScript bundles, API prefixes, microservice names, authentication endpoints, tenant identifiers and public configuration for API endpoints. Do not limit reconnaissance to HTML pages.
- Identify interesting namespaces. Pay attention to
/api/,/admin/,/internal/,/open/,/public/,/guest/,/users/,/accounts/,/identity/and/profile/. These are not automatically vulnerable; they are areas where authorization mistakes have significant impact. - Find collection endpoints. Search for
/users,/accounts,/members,/students,/employees,/customersand/profiles. - Remove authentication. With a legitimate session, reproduce the API request and progressively remove
Authorization, cookies, session identifiers, CSRF tokens and custom authentication headers, observing what changes. - Test invalid authentication. Test no token, invalid token, expired token and malformed token, not only a valid one.
- Identify routing requirements. If the API requires
X-Tenant-ID,X-Organization-IDorX-Client-ID, determine whether the value is a secret or public routing information. - Inspect the response schema. Look for internal IDs, email addresses, roles, timestamps, device identifiers, tokens, administrative metadata and references to other objects. The fields that matter most are often not visible in the UI.
- Do not stop at the first record. Determine whether the API supports a single object such as
/users/123or the entire collection at/users, which could expose 100, 1,000, 10,000 or 100,000+ records. - Quantify impact. Report measurable evidence such as record counts, unique email counts, registration counts and response size rather than "a huge number of users".
- Know when to stop. Once no authentication, sensitive data and mass extraction are proven, further exploitation is usually unnecessary.
The complete reasoning chain the researcher records is: API reconnaissance, identity service discovered, /open/ namespace identified, /users collection discovered, 400 response without tenant, investigate the reason for the 400, tenant header identified, tenant value found to be publicly discoverable, request repeated with the tenant header, 200 OK without authentication, invalid bearer produces the same result, full collection returned, 103,349 records identified, sensitive fields identified, 28,556 push registrations identified, mass unauthenticated PII disclosure. The final takeaway is that a routing requirement is not authentication, a public tenant identifier is not a credential, an /open/ prefix is not proof of safety, and a collection endpoint backed by a raw identity repository can turn a small authorization mistake into a massive privacy breach.
What happened, in plain words
A security researcher was testing a website whose backend uses a shared identity service. Behind the website there is a service that stores information about every person who has an account: their name, their school email address, their role (student, staff, and so on), when they last logged in, and which phones or browsers they have registered to receive push notifications.
Normally, only someone who has logged in should be able to see that information. The researcher found that anyone at all, with no account, no password and no login of any kind, could ask the service for the whole list in a single request. The service handed back more than 103,000 people's records, including about 103,262 school email addresses and about 28,556 push-notification device registrations, in one response of roughly 116 MB.
The interesting part is how it was found. The first attempt did not work: the server answered with an error, 400 Bad Request. Most people would have stopped there and assumed the door was locked. The researcher instead asked why the error happened, found that the request was missing a piece of information used only to decide which organisation the request belongs to, added it, and the door opened.
This article walks through the whole story slowly, explaining every term as it appears. You only need to know how to use a browser.
1. The mindset: think about the parts you cannot see
When you use a website, you see pages: buttons, forms, menus. But the page in your browser is only the front. Behind it, the browser is constantly sending small messages to computers you never see, asking for data and sending data back. Those messages are what we are going to talk about.
A useful everyday comparison: a restaurant. The menu you are handed is the frontend, the part designed for you. The kitchen is the backend, where the actual work happens. The waiter who carries orders between you and the kitchen is the API. You are not supposed to walk into the kitchen, but if the kitchen door is unlocked, the fact that the menu does not mention the kitchen does not stop you.
The researcher's working assumptions were:
- Do not think only about what the frontend allows.
- Ask which APIs the application uses, which services sit behind the gateway, which routes are authenticated, which are intentionally public, what happens when the API is called directly, and what the server actually uses to make its authorization decision.
In plain words: do not assume that because a button is missing from the page, the thing behind the button is unreachable. Ask what messages the page sends, which internal services receive them, which of those messages require a login, which are meant to be open to everyone, what happens if you send the message yourself without going through the page, and, most importantly, what piece of information the server actually checks before saying yes.
The architecture, in everyday terms
The researcher describes the system as a chain of layers:
Browser
|
v
CDN / Reverse Proxy
|
v
API Gateway
+---- Authentication
+---- Routing
+---- Authorization
|
v
Microservices
+---- Identity Service
+---- User Service
+---- Notification Service
+---- Other APIs
Line by line:
Browser: the program on your computer that shows the website.CDN / Reverse Proxy: a first stop that receives requests and passes them on. Think of a reception desk in a large building: it does not do the work, it points you to the right floor. A CDN (content delivery network) also keeps copies of files close to users so pages load faster.API Gateway: the main entrance for API messages. It is supposed to check who you are (authentication), decide where your message should go (routing), and decide whether you are allowed to do what you are asking (authorization).Microservices: small separate programs, each responsible for one job. The identity service deals with accounts, the user service with user details, the notification service with push messages.
The bug lives at the boundary between the gateway and the identity backend.
2. Finding the identity API
The researcher found an API structure associated with an identity service:
/unifyd-gateway/api/unifydidentity/
This is a path, the part of a web address after the site name that says which resource you want. Reading it left to right: unifyd-gateway is the gateway, api says this is an API rather than a web page, and unifydidentity is the identity service. It is like a postal address: country, city, street, house number.
Within that, one piece stood out:
/unifyd-gateway/api/unifydidentity/open/
The word open suggests a part of the service meant to be reachable without logging in. The researcher lists the kinds of endpoints that are legitimately public under such a prefix:
/open/login
/open/config
/open/health
/open/metadata
Line by line:
/open/login: the address your browser talks to when you sign in. It must be reachable before you are logged in, otherwise you could never log in./open/config: settings the page needs to start up, such as which services to talk to./open/health: a simple check that the service is alive, used by monitoring tools./open/metadata: descriptive information about the service.
Seeing /open/ is not a finding. Plenty of things are meant to be public. The question the researcher kept asking was what functionality is actually reachable under the supposedly open namespace, meaning: what else lives under this public prefix that should not be public?
The answer was a collection endpoint:
GET /unifyd-gateway/api/unifydidentity/open/users
Line by line:
GET: the type of request.GETmeans "give me something". It is what your browser sends when you open a page. Other types exist, such asPOST(send something new) orDELETE(remove something)./unifyd-gateway/api/unifydidentity/open/users: the path being requested, ending inusers, which strongly suggests a list of user accounts.
A /users collection endpoint is interesting because a single authorization mistake there can expose every object in the collection rather than one record. A collection endpoint is one that returns a list rather than a single item. Compare a library: asking for one book by its title gives you one book; asking for the whole shelf gives you everything on it. If the shelf is unlocked, the mistake is much bigger.
In this case the endpoint returned the raw identity entity, including institutional email addresses, internal database identifiers, organisational roles, last-login timestamps and push-notification device registrations, for more than 103,000 users. An entity here means the record as it is stored in the database, with all its fields, rather than a tidy version prepared for public display.
3. The first interesting response
The first request to the collection endpoint, sent without the expected tenant-routing information, returned:
HTTP/1.1 400 Bad Request
Line by line:
HTTP/1.1: the version of the language that browsers and servers use to talk to each other. HTTP is the set of rules for those messages.400: a status code, a three-digit number the server sends back to summarise what happened.400means "bad request": the server could not make sense of what you sent.Bad Request: the human-readable name for that code.
The easy conclusion would have been that the endpoint is protected. The researcher rejected that conclusion because a 400 does not normally mean "you are not authenticated"; it means the server rejected something about the request itself. Authentication means proving who you are, usually by logging in. A 400 is more like a form being rejected because a required box was left empty: it says nothing about whether you are allowed in the building.
The question changed from "is this endpoint protected?" to "what condition causes the server to return 400?". That is the whole trick of this story: treat an error as a clue, not a wall.
4. Understanding the tenant header
The API required a tenant-routing header:
x-tenant-id: mymohawkcollegeu8
Line by line:
x-tenant-id: the name of a header. Headers are small labelled pieces of information attached to every request, like the fields on the outside of an envelope: sender, recipient, special handling. Thex-prefix is a convention for custom headers invented by the application rather than defined by the HTTP standard.mymohawkcollegeu8: the value of that header. A tenant here means one organisation using a shared service. A single system can serve many organisations, and the tenant identifier tells it which one this request is for.
The next task was to decide whether that value was an authentication secret or simply a routing selector. In everyday terms: is this a password, or is it just the name of the department on the envelope so the mailroom knows where to deliver?
The researcher found the tenant identifier was not a secret credential: it was publicly discoverable through client-side application resources, so an external user could determine the correct value without an account. Client-side resources are the files your browser downloads to run the page, such as JavaScript files. JavaScript is the programming language that makes web pages interactive, and those files often contain configuration values, including tenant names, because the browser needs them to talk to the right backend.
The request flow the researcher describes is an attacker supplying x-tenant-id, the gateway routing the request to the tenant, and the identity API then reaching the user repository without an authentication check. A repository is the part of the software that fetches records from the database. The picture is: the mailroom reads the department name, delivers the envelope, and nobody at the department asks who sent it.
5. Testing different login states
Rather than trusting a single request, the researcher tested several combinations of tenant header and authentication. The matrix was:
| Request | Result |
|---|---|
| Tenant header only | 200 OK, full directory returned |
| Tenant header + invalid bearer | 200 OK, full directory returned |
| Valid bearer without tenant header | 400, routing failure |
| No headers | 400, routing failure |
What the terms mean:
200 OK: the success status code. The server understood the request and answered it.- Bearer token: a long string of characters that acts like a temporary pass. When you log in, the server may give your browser one, and the browser sends it with later requests to prove who you are. "Invalid bearer" means a made-up or expired pass.
- Routing failure: the server could not work out where to send the request, so it returned
400.
The decisive comparison is that no authentication plus correct tenant routing yields 200 OK, while authentication with missing tenant routing yields 400. An invalid bearer token changed nothing. That is strong evidence the tenant header participates in routing, not authorization. In everyday terms: the department name on the envelope gets the letter delivered, but nobody checks the ID card. Showing a fake ID card changes nothing, and forgetting the department name stops delivery even if your ID is genuine.
6. The smallest possible proof
The vulnerable request needed only two headers:
GET /unifyd-gateway/api/unifydidentity/open/users HTTP/1.1
Host: target.example
x-tenant-id: mymohawkcollegeu8
Line by line:
GET /unifyd-gateway/api/unifydidentity/open/users HTTP/1.1: the request line.GETasks for data, the path says which data, andHTTP/1.1is the protocol version.Host: target.example: tells the server which website name the request is for. One server can host many sites, so it needs to know which one you meant.target.exampleis a placeholder name used in examples.x-tenant-id: mymohawkcollegeu8: the routing header from the previous section.
There was no Authorization: Bearer ..., no session cookie, no authenticated account and no CSRF token. In plain words:
- No
Authorizationheader: the standard place where a bearer token would be sent. It was simply absent. - No session cookie: a cookie is a small piece of data a website stores in your browser so it can recognise you on your next request, like a cloakroom ticket. A session cookie is the one that says "this is the person who logged in". There was none.
- No authenticated account: nobody had logged in at all.
- No CSRF token: CSRF stands for cross-site request forgery, an attack where another website tricks your browser into sending a request you did not intend. To prevent it, sites often include a secret value in each form, a CSRF token, which the other site cannot guess. There was none here, and none was needed.
The server answered:
HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
Line by line:
HTTP/1.1 200 OK: success.Content-Type: application/json: the format of the body. JSON is a simple text format for structured data, using curly braces and labels, a bit like a very tidy shopping list.Transfer-Encoding: chunked: the body is sent in pieces as it is produced rather than all at once. Useful for very large responses, because the server does not have to hold everything in memory before starting to send.
The body contained user records directly. That established the authentication bypass: a request with no login at all was being answered with private data. The next question was how much data was exposed.
7. What a single record looked like
The response was not a minimal public directory. Individual records looked like this:
{
"id": "...",
"firstName": "...",
"lastName": "...",
"role": [
"AADStudents",
"AllUsers",
"Public"
],
"secondaryEmail": "...",
"tenant": "...",
"email": "...",
"channels": [
"email",
"push"
],
"lastlogindate": "...",
"devices": [
{
"type": "Android",
"id": "..."
}
]
}
Line by line:
- The outer
{and}wrap one record. Inside, each line is a label in quotes, a colon, and a value. This is JSON. "id": an internal identifier for the user in the database. Not meant for outsiders."firstName"and"lastName": the person's name."role": a list, shown by the square brackets[ ], of groups the person belongs to.AADStudentssuggests students,AllUserseveryone,Publica general group."secondaryEmail": a second email address on file."tenant": which organisation the record belongs to."email": the main email address."channels": how the person can be contacted.emailandpushmean email and push notifications. A push notification is the pop-up message an app shows on your phone even when the app is closed."lastlogindate": when the person last signed in."devices": a list of devices registered for push notifications. Each has atype, hereAndroid, and anid, a token-like identifier used to send messages to that specific device.
The researcher contrasts the intended public representation, which might have contained only a name and a department, with what the API actually returned: internal ID, name, email, secondary email, roles, login timestamp, device registrations and other metadata. Returning the database entity rather than a designed public view is what turns an authorization failure into a serious disclosure. In everyday terms: a public noticeboard should show a name and a department. Instead it printed the personnel file.
8. Recognising the repository pattern
The behaviour was consistent with a Spring Data REST-style repository exposure. Spring is a popular toolkit for building Java applications, and Spring Data REST is a part of it that can automatically turn database repositories into web endpoints. Convenient for developers, because they get endpoints without writing them, but dangerous if those endpoints end up reachable from the internet without checks.
The researcher is careful about the framing: the question is not whether Spring Data REST is vulnerable, because it is not necessarily, but whether a sensitive repository was unintentionally made reachable without the authorization controls that should protect it. The tool is not the bug; the missing check is.
The effective architecture becomes database, repository, Spring Data REST, gateway, internet:
Database
|
v
Repository
|
v
Spring Data REST
|
v
Gateway
|
v
Internet
Line by line: the database stores the records, the repository fetches them, Spring Data REST turns the repository into web addresses, the gateway passes requests in from outside, and the internet is everyone. Each layer is a door. The bug is that one of the doors had no lock.
9. Measuring the scale
The endpoint returned the entire collection rather than requiring individual user identifiers. The captured response contained approximately:
103,349 user records
with approximately:
103,262 distinct institutional email addresses
The complete response was approximately:
116 MB
and was streamed using chunked transfer encoding. MB means megabytes, a unit of data size. For comparison, a typical photo is a few megabytes, so this response was like downloading a few dozen photos in one go.
That moved the finding from unauthenticated access to user information to unauthenticated mass disclosure of the entire user directory, which changes the severity assessment. Severity is how serious a problem is judged to be. One leaked record is bad; a hundred thousand leaked records in one request is a different category of problem, because it can be copied automatically and used at scale.
10. Device registrations
The dataset also contained device registration information. Approximately:
28,556
push-notification device registrations were observed, with device types and token-like identifiers associated with push infrastructure, including Android, iOS and web registrations. iOS is Apple's phone operating system; Android is Google's; web means a browser.
The researcher did not attempt to use the tokens, because the unauthorised exposure itself was sufficient to demonstrate impact. The stated principle is not to escalate an already-proven vulnerability simply to make the report more dramatic, since further exploitation of exposed credentials or security-sensitive identifiers creates unnecessary risk. In everyday terms: finding a key on the ground proves the key was lost. You do not need to walk into the house to prove it.
11. Privileged staff roles
The dataset contained organisational roles. Examples included roles associated with:
Human Resources
Finance
Financial Assistance
Registration
These are departments. Human Resources handles staff matters, Finance handles money, Financial Assistance handles student aid, and Registration handles enrolment.
Approximately twenty distinct privileged or editor-style role categories were observed. That lets an attacker distinguish general users from users associated with sensitive organisational functions. Instead of only an address such as [redacted], an attacker could hold a name, institutional email, organisational role and last login, which makes targeted phishing and social engineering more convincing and produces a valuable reconnaissance dataset.
Phishing is a fake message designed to trick someone into giving away a password or clicking something harmful. Social engineering is the broader trick of manipulating people rather than machines. Reconnaissance means gathering information before an attack. A message that says "Dear student" is easy to ignore; one that says "Dear [name], regarding your Finance role, please confirm your login" is much harder to dismiss, and the extra details came straight from this leak.
12. Deliberate limits
Because the endpoint exposed real user information, testing was intentionally limited. The researcher did not:
- attempt to log into other accounts;
- attempt password resets;
- attempt account takeover;
- attempt to send push notifications;
- attempt to use exposed device tokens;
- modify user records;
- delete or change data;
- contact exposed users;
- perform credential stuffing;
- attempt destructive actions.
Some terms: account takeover means getting into someone else's account. Credential stuffing means trying lists of stolen username and password pairs on other sites, hoping people reused them. Destructive actions are anything that damages or removes data.
The objective was to demonstrate unauthenticated access, sensitive information and mass extraction, which was already sufficient. Responsible disclosure matters especially when a large population of real users is involved. Responsible disclosure means telling the organisation privately and giving it time to fix the problem, rather than publishing or abusing it.
13. Why the 400 was the most important clue
The most valuable lesson from this finding was understanding the difference between routing validation and authentication. Routing validation checks whether the request can be delivered to the right place. Authentication checks who you are. They are not the same thing, and a server can do the first without the second.
The researcher's diagram of the behaviour is: if the tenant header is absent, return 400; if present, continue processing; if authentication is not enforced, return 200 OK.
Request
|
v
Tenant header present?
|
+---- NO ----> 400
|
YES
|
v
Continue processing
|
v
Authentication enforced?
|
+---- NO
|
v
200 OK
Line by line: a request arrives. The first question is whether the tenant header is there. If not, the server cannot route it, so it returns 400. If it is there, the server carries on. The next question is whether authentication is enforced. In this case it was not, so the server returned 200 OK with the data.
An invalid bearer token produced the same result as no token at all, which strongly indicated that authentication was not part of the authorization decision for this route. So 400 did not mean "you are not allowed"; it meant "I cannot tell where to send this".
14. Testing authentication properly
A useful approach is to build an authentication matrix: a small table of combinations, so you compare states instead of guessing. The researcher's grid was:
| No Tenant | Valid Tenant | |
|---|---|---|
| No Authentication | ? | ? |
| Invalid Authentication | ? | ? |
| Valid Authentication | ? | ? |
Then record, for each cell:
HTTP status
Response size
Response structure
Authentication headers
Sensitive fields
Line by line:
- HTTP status: the three-digit code, such as
200or400. - Response size: how much data came back. A sudden jump in size often means more data than expected.
- Response structure: the shape of the answer, for example a list versus a single item.
- Authentication headers: whether an
Authorizationheader was present and what it contained. - Sensitive fields: whether names, emails, roles or tokens appear in the body.
In this case, the interesting state was no authentication plus valid tenant equals the full dataset, while an invalid bearer token produced essentially the same result. That is strong evidence that authentication was not participating in the authorization decision.
15. A repeatable method for looking at APIs
The finding also demonstrates a workflow you can follow elsewhere.
Step 1: map the application
Look for:
API endpoints
JavaScript bundles
API prefixes
Microservice names
Authentication endpoints
Tenant identifiers
Public configuration
Line by line:
- API endpoints: the addresses the page talks to.
- JavaScript bundles: the files of code the browser downloads. They often mention those addresses.
- API prefixes: the common beginnings of those addresses, such as
/api/. - Microservice names: the separate services, such as identity or notification.
- Authentication endpoints: the addresses used for logging in.
- Tenant identifiers: values like
mymohawkcollegeu8that say which organisation a request is for. - Public configuration: settings the page needs before login.
Do not limit reconnaissance to HTML pages. HTML is the markup of the page itself; the interesting addresses are usually in the code files behind it.
Step 2: identify interesting namespaces
Pay attention to:
/api/
/admin/
/internal/
/open/
/public/
/guest/
/users/
/accounts/
/identity/
/profile/
A namespace is a family of addresses that share a beginning. These are not automatically vulnerable; they are areas where authorization mistakes have significant impact. /admin/ suggests administration, /internal/ suggests things meant for staff, /guest/ suggests limited access, and so on.
Step 3: find collection endpoints
Search for endpoints such as:
/users
/accounts
/members
/students
/employees
/customers
/profiles
A collection endpoint deserves additional attention because a single authorization failure may expose thousands of objects. One unlocked shelf, many books.
Step 4: remove authentication
If you have a legitimate authenticated session, reproduce the API request and then progressively remove:
Authorization
Cookies
Session identifiers
CSRF tokens
Custom authentication headers
Line by line: start with the request exactly as the browser sends it while you are logged in. Then take away one proof of identity at a time: the Authorization header, the cookies, the session identifier inside them, the CSRF token, any custom header the app uses for login. Observe what changes. If the data still comes back after everything is removed, the check was not really there.
Step 5: test invalid authentication
Do not only test a valid token. Also test:
No token
Invalid token
Expired token
Malformed token
Line by line: no token at all; a made-up token; a real token that has expired; and a token in the wrong format, for example with characters missing. If an invalid token receives the same sensitive response as a valid session, investigate further.
Step 6: identify routing requirements
If the API requires:
X-Tenant-ID
X-Organization-ID
X-Client-ID
determine whether the value is a secret or public routing information. A public tenant identifier is not equivalent to a password. These three headers are all variations on the same idea: which organisation or application the request belongs to.
Step 7: inspect the response schema
Look for:
Internal IDs
Email addresses
Roles
Timestamps
Device identifiers
Tokens
Administrative metadata
References to other objects
A schema is the list of fields a response contains. The fields that matter most are often not visible in the UI. The UI is what you see on screen; the response can carry much more.
Step 8: do not stop at the first record
Determine whether the API supports a single object such as /users/123 or the entire collection at /users, which could expose 100, 1,000, 10,000 or 100,000+ records. Pagination means splitting a long list into pages, for example 50 at a time. Without it, one request returns everything.
Step 9: quantify impact
Report measurable evidence such as record counts, unique email counts, registration counts and response size rather than "a huge number of users". Blast radius means how much damage a single problem can cause.
Step 10: know when to stop
Once no authentication, sensitive data and mass extraction are proven, further exploitation is usually unnecessary. You have shown the door is open; you do not need to walk through the building.
16. The complete reasoning chain
The researcher records the chain of steps that led to the finding:
API reconnaissance
|
v
Identity service discovered
|
v
/open/ namespace identified
|
v
/users collection discovered
|
v
400 response without tenant
|
v
Investigate reason for 400
|
v
Tenant header identified
|
v
Tenant value found to be publicly discoverable
|
v
Request repeated with tenant header
|
v
200 OK without authentication
|
v
Invalid bearer produces same result
|
v
Full collection returned
|
v
103,349 records identified
|
v
Sensitive fields identified
|
v
28,556 push registrations identified
|
v
Mass unauthenticated PII disclosure
Line by line: first, look around the application and note the addresses it uses. Find the identity service. Notice the /open/ family of addresses. Find the /users list. Get a 400 when the tenant header is missing. Ask why. Find the header. Discover that its value is public. Send the request again with it. Get 200 OK with no login. Confirm that a fake token makes no difference. Receive the whole list. Count the records. Note the sensitive fields. Count the push registrations. Conclude that personal data was exposed at scale. PII stands for personally identifiable information: data that can identify a real person, such as a name, email address or device identifier.
The final takeaway is that a routing requirement is not authentication, a public tenant identifier is not a credential, an /open/ prefix is not proof of safety, and a collection endpoint backed by a raw identity repository can turn a small authorization mistake into a massive privacy breach.
17. What should have been done differently
The report sets out remediation as recommendations; it does not describe changes that were made. Remediation means the fix.
- Enforce authentication. The user collection endpoint should require authentication, enforced independently of the tenant-routing mechanism. In plain words: check the ID card at the door, and do not let the department name on the envelope count as an ID card.
- Enforce authorization. Authentication alone is not enough; the application should verify that the authenticated user is authorised to access the requested tenant and resource. The flow should be: authenticate user, determine tenant, authorise requested resource, return only permitted data. Knowing who someone is does not automatically mean they may see everything.
- Audit
/open/routes. If the gateway treats/open/*as unauthenticated, every endpoint under that namespace should be reviewed, because fixing one endpoint may leave other sensitive APIs exposed. An audit is a systematic review. - Avoid raw repository exposure. Sensitive persistence entities should not be automatically exposed to the internet. Prefer explicit DTOs, for example:
class PublicUser:
first_name: str
last_name: str
Line by line: class PublicUser: defines a new, deliberately small shape for public data. first_name: str and last_name: str say it contains only a first name and a last name, each as text (str means string, a piece of text). Nothing else is included. A DTO, data transfer object, is exactly this: a small object built only for sending data out, with no extra fields. And control explicitly which fields are exposed.
5. Remove sensitive fields. Internal database IDs, secondary email, device registrations, push tokens and internal role metadata should not appear in an unauthenticated directory response.
6. Implement pagination and limits. Even authenticated APIs should use pagination, a maximum page size, rate limiting and abuse detection. Rate limiting caps how many requests someone can make in a period; abuse detection watches for unusual patterns. This does not replace authorization but reduces the impact of accidental bulk exposure.
7. Rotate exposed device registrations. Because push-registration identifiers were exposed, affected registrations should be evaluated and rotated or invalidated where appropriate. Rotating means replacing the old identifier with a new one so the leaked one stops working.
18. The final lesson
The most important lesson from this vulnerability is simple: do not assume that an endpoint is protected just because the application initially rejects your request. A rejection can be about the shape of the request, not about who you are.
A routing requirement is not authentication. A public tenant identifier is not a credential. An /open/ prefix is not proof that the endpoint is safe. And a collection endpoint backed by a raw identity repository can turn a small authorization mistake into a massive privacy breach.
For anyone learning, the biggest takeaway is: do not just test whether an endpoint works. Understand why it works, what security boundary is supposed to protect it, and what happens when that boundary is removed. That mindset is what turns ordinary API reconnaissance into meaningful vulnerability discovery.
Glossary
- API: the set of addresses and rules a program uses to ask another program for data or actions, like a waiter carrying orders between you and the kitchen.
- API gateway: the main entrance for API requests, responsible for checking identity, routing requests and deciding what is allowed.
- API prefix: the common beginning of a family of API addresses, such as
/api/. - Audit: a systematic review of something, here of every endpoint under a path.
- Authentication: proving who you are, usually by logging in.
- Authorization: deciding whether the person who has been identified is allowed to do what they are asking.
- Authorization header: the standard header where a bearer token is sent.
- Bearer token: a long string that acts like a temporary pass, sent with requests to prove identity.
- Blast radius: how much damage one problem can cause.
- CDN (content delivery network): a network of servers that keeps copies of files close to users so pages load faster.
- Chunked transfer encoding: sending a response body in pieces as it is produced rather than all at once.
- Client-side resources: the files a browser downloads to run a page, such as JavaScript and configuration.
- Collection endpoint: an address that returns a list of items rather than a single item.
- Cookie: a small piece of data a website stores in your browser so it can recognise you on later requests.
- Credential stuffing: trying lists of stolen username and password pairs on other sites, hoping people reused them.
- CSRF (cross-site request forgery): an attack where another website tricks your browser into sending a request you did not intend.
- CSRF token: a secret value included in forms to prevent CSRF.
- Database: the organised store where records are kept.
- DTO (data transfer object): a small object built only for sending data out, containing just the fields that should be exposed.
- Endpoint: a specific address on a server that accepts requests, such as
/users. - Entity: a record as stored in the database, with all its fields.
- Frontend: the part of an application designed for users to see and interact with.
- GET: the request type that asks for data.
- Header: a small labelled piece of information attached to a request or response, like fields on an envelope.
- HTML: the markup language that describes the structure of a web page.
- HTTP: the set of rules browsers and servers use to exchange messages.
- Identity service: the part of a system that manages accounts and identity data.
- iOS: Apple's phone operating system.
- Android: Google's phone operating system.
- JavaScript: the programming language that makes web pages interactive; its files often contain configuration values.
- JSON: a simple text format for structured data, using curly braces and labels.
- MB (megabyte): a unit of data size, roughly a few photos.
- Metadata: data that describes other data, such as when something was created or which service owns it.
- Namespace: a family of addresses or names that share a beginning.
- Pagination: splitting a long list into pages, for example 50 items at a time.
- Phishing: a fake message designed to trick someone into giving away a password or clicking something harmful.
- PII (personally identifiable information): data that can identify a real person, such as a name, email address or device identifier.
- Push notification: the pop-up message an app shows on your phone even when the app is closed.
- Rate limiting: capping how many requests someone can make in a period of time.
- Reconnaissance: gathering information about a target before acting.
- Remediation: the fix for a vulnerability.
- Repository: the part of the software that fetches records from the database.
- Responsible disclosure: telling an organisation privately about a problem and giving it time to fix it, rather than publishing or abusing it.
- Reverse proxy: a server that receives requests first and passes them on to the right place.
- Role: a group a user belongs to, such as students or staff, which often determines what they can do.
- Routing: deciding where a request should be sent.
- Schema: the list of fields a response contains.
- Severity: how serious a problem is judged to be.
- Social engineering: manipulating people rather than machines to get access or information.
- Spring Data REST: a part of the Spring toolkit that can automatically turn database repositories into web endpoints.
- Status code: the three-digit number a server sends back to summarise what happened, such as
200or400. - Tenant: one organisation using a shared service; the tenant identifier says which one a request is for.
- Token: a string of characters used as a pass or identifier, such as a bearer token or a push device token.
- UI (user interface): what you see and interact with on screen.
200 OK: the success status code.400 Bad Request: the status code meaning the server could not make sense of the request.