Vulnerable design leads to personal data leakage- yet another case of an inter-application vulnerability…
Published on medium.com
{{media:0}}
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 a bug bounty program run by a major international company. The researcher does not name the company or the applications, citing confidentiality. The program's scope covered multiple domains, each hosting an application used for a broadly similar purpose. Two of these applications, referred to here as App1 and App2, are the subject of the write-up.
Both applications shared code for certain functionalities. In particular, both queried the same backend data source to retrieve information about users. The shared mechanisms processed sensitive personal data, both reading and writing it, and that data could be updated after a successful registration. The registration mechanism itself, however, was clearly separated between the two applications.
This is the pattern the author calls an inter-application vulnerability: each application, considered on its own, is free of vulnerabilities, but the two taken together create a security concern.

Setup
No tooling, versions or specific accounts are described. The precondition for the issue is architectural rather than procedural: two applications in scope, a shared backend data source holding personal data, shared read/write code paths for that data, and independent registration flows. The researcher reached the finding through ordinary testing of the applications in scope, noting that the code behind certain functionalities was shared.
Finding it
While testing the applications, the researcher observed that the code of certain functionalities was common to both. Both applications appeared to query the same backend data source to obtain information about users. On its own this is a normal integration pattern, but combined with the fact that the shared mechanisms handled sensitive personal data, and that registration was separate, it raised the question of how the two flows interacted.
The data retrieval process is simple. After a successful authentication, the application server sends a request to the backend data source to query personal data based on the e-mail address provided during authentication.


The design is illustrated in the diagrams above: the vulnerable design, and the query against the database keyed on the e-mail address supplied at authentication.
Exploitation
Step 1: register in App2 with an address already registered in App1
The reasoning is direct. If the lookup is keyed on the e-mail address, and registration in App2 is independent of registration in App1, then registering in App2 with an e-mail address that already exists in App1 should cause App2 to resolve to the existing record in the shared data source.

Step 2: authenticate and read the returned data
The report describes the scenario: registering in App2 with an address already registered in App1, then authenticating, would return the personal data associated with that address. Because authentication succeeded, the application server queried the backend data source by e-mail address and returned the personal data associated with that address, which belonged to the user registered in App1.
The report does not include the raw HTTP requests or responses for these steps, so the exact endpoints, parameters and payloads are not reproduced here.
Step 3: repeat against the other application
The same exercise can be repeated against the other application to gather more personal details. The researcher notes that there was no account activation e-mail and no other mechanism to prevent this kind of attack.
Root cause
The flaw is in the design, not in a single line of code. The applications share a data source and share the code that reads and writes personal data, but they do not share, or do not enforce, a single notion of account ownership. Registration is separate, so App2 accepts an e-mail address that App1 has already bound to a real user, and the subsequent lookup by e-mail address returns that user's record. The trust boundary between the two applications is missing: each application trusts an identifier (the e-mail address) that the other application has already assigned to someone else.
Existing defences did not stop it because there was no activation e-mail and no other verification step that would have confirmed the registrant controlled the address. The report does not describe any further controls.
Impact
An attacker can access personal data of any user registered in the shared database simply by knowing that user's e-mail address. The data is sensitive personal data, and the same technique can be run against both applications to collect more of it. The attack scales: given a leaked list of e-mail addresses, the attacker can pipe all of them through the vulnerable application and obtain the personal details associated with whichever addresses match registered users, then repeat the exercise against the second application. The researcher remarks that this was good enough to get a bounty.
The report does not quantify the number of affected users or the exact fields exposed.
Fix
Based on the root cause, the fix belongs in the design: the shared data source should not resolve a record purely on an e-mail address supplied by a separate registration flow. Ownership of the address needs to be verified before any data is returned, for example through an activation step, and the two applications need a consistent notion of which account owns which record.
Variants to test
- Register in application B with an address already registered in application A, then authenticate. A positive result is that B returns profile data belonging to the A account.
- Check whether registration in either application sends an activation e-mail or otherwise verifies control of the address. Absence of verification widens the attack to addresses the attacker does not own.
- Look for other shared identifiers used as lookup keys, such as usernames or phone numbers, where registration is separate but the data store is common. A positive result is data returned for an identifier registered through the other application.
- Test the write path as well as the read path: if the shared code updates personal data after registration, check whether an account created in B can modify the record of an account created in A. A positive result is a change visible in A.
Where several applications in scope share a backend, repeat the exercise across each pair.
What happened, in plain words
A security researcher was taking part in a bug bounty programme. A bug bounty programme is a scheme where a company invites outside people to look for security problems in its systems and pays them for reporting what they find. The company in this case was a major international company, and the researcher does not name it or the applications involved, because the programme's rules required confidentiality.
The company's programme covered several websites, each of which was an application used for a broadly similar purpose. Two of these applications are the subject of the write-up, and the researcher calls them App1 and App2.
Both applications shared some of their code. In particular, both asked the same backend data source for information about users. A backend data source is the place behind the scenes where the real data lives, such as a database. The shared code both read and wrote sensitive personal data, and that data could be updated after a successful registration. Registration, however, was clearly separate in the two applications: each had its own sign-up process.
This is the pattern the author calls an inter-application vulnerability. Each application, looked at on its own, has no vulnerability. But the two taken together create a security problem. A simple comparison: two doors, each with a good lock, but both open onto the same room, and the keys are handed out by two different people who never talk to each other.

The diagram above illustrates this kind of situation: two applications that are individually fine but together create a gap.
Background: what the applications were
The researcher does not describe the applications in detail beyond saying that the programme's scope covered multiple domains used for a quite similar purpose. A domain is the part of a web address after the "www", for example example.com. Each domain hosted an application.
While testing these applications, the researcher noticed that the code behind certain functionalities was shared. What does that mean in plain terms? It means that when you used a particular feature in App1 and the same feature in App2, the same underlying program was doing the work. In this case, both applications appeared to query the same backend data source to get information about users.
On its own, sharing a backend is a normal and common way to build systems. Many companies run several websites that all draw on one central store of data, so that a change made in one place shows up everywhere. The problem here was the combination: the shared mechanisms handled sensitive personal data, both reading it and writing it, and registration was separate.
The design, step by step
The researcher drew diagrams to make the situation clear. The first shows the vulnerable design as a whole.

In the diagram, the two applications sit in front of a shared data source. Each application has its own registration flow, but both read and write personal data in the same place.
The data retrieval process is relatively simple. If authentication is successful, the application server sends a request to the backend data source to query personal data based on the e-mail address provided during authentication. Authentication means proving who you are, normally by entering your e-mail address and password. The application server is the computer that runs the website and answers your browser's requests.

This second diagram shows the query going from the application to the database, keyed on the e-mail address. In everyday terms: you tell the receptionist your name, the receptionist checks the list, and hands you the file that has that name on it. The receptionist never asks whether the file is really yours.
Finding it
The researcher reached the finding through ordinary testing of the applications in scope. No special tools, versions or accounts are described in the report. The precondition for the issue is architectural rather than procedural: two applications in scope, a shared backend data source holding personal data, shared read and write code paths for that data, and independent registration flows.
While testing, the researcher observed that the code of certain functionalities was common to both applications, and that both appeared to query the same backend data source to obtain information about users. On its own this is a normal integration pattern. Combined with the fact that the shared mechanisms handled sensitive personal data, and that registration was separate, it raised an obvious question: how do the two flows interact?
Exploitation
Step 1: register in App2 with an address already registered in App1
The reasoning is direct. If the lookup is keyed on the e-mail address, and registration in App2 is independent of registration in App1, then registering in App2 with an e-mail address that already exists in App1 should cause App2 to resolve to the existing record in the shared data source.
In plain words: if someone signs up to App2 using an e-mail address that already belongs to a real user of App1, App2 accepts it. Because App2's sign-up did not check with App1, it accepted the address. Because the data lookup is by e-mail address, App2 then found the record that App1 had created for that address.

This diagram shows what happens next: the new registration in App2 reaches the data that belongs to the user registered in App1.
Step 2: authenticate and read the returned data
The report describes the scenario: after registering in App2 with an address already registered in App1, authenticating to App2 returns the personal data associated with that address. Because authentication succeeded, the application server queried the backend data source by e-mail address and returned the personal data associated with that address, which belonged to the user registered in App1.
The report does not include the raw HTTP requests or responses for these steps, so the exact endpoints, parameters and payloads are not reproduced here. An endpoint is the specific address on a server that handles a particular action, for example the address that handles sign-up. A parameter is a named value sent along with a request, such as an e-mail address. A payload is the part of a request that carries the data you are sending.
Step 3: repeat against the other application
The same exercise can be repeated against the other application to gather more personal details. The researcher notes that there was no account activation e-mail and no other mechanism to prevent this kind of attack. An account activation e-mail is a message sent to the address you signed up with, containing a link you must click to prove the address is really yours. Without it, anyone can claim any address.
Why it works: the root cause
The flaw is in the design, not in a single line of code. The applications share a data source and share the code that reads and writes personal data, but they do not share, or do not enforce, a single notion of account ownership. Registration is separate, so App2 accepts an e-mail address that App1 has already bound to a real user, and the subsequent lookup by e-mail address returns that user's record.
The trust boundary between the two applications is missing. A trust boundary is the line between two parts of a system that are allowed to trust each other's decisions. Here, each application trusts an identifier, the e-mail address, that the other application has already assigned to someone else. A comparison: two offices in the same building each keep a key cabinet, and each accepts any key that fits, without checking who issued it.
Existing defences did not stop it because there was no activation e-mail and no other verification step that would have confirmed the registrant controlled the address.
Impact
An attacker can access personal data of any user registered in the shared database simply by knowing that user's e-mail address. The data is sensitive personal data, and the same technique can be run against both applications to collect more of it.
The attack scales. Given a leaked list of e-mail addresses, the attacker can pipe all of them through the vulnerable application and obtain the personal details associated with whichever addresses match registered users, then repeat the exercise against the second application. The researcher remarks that this was good enough to get a bounty.
The report does not quantify the number of affected users or the exact fields exposed.
Fix
Based on the root cause, the fix belongs in the design: the shared data source should not resolve a record purely on an e-mail address supplied by a separate registration flow. Ownership of the address needs to be verified before any data is returned, for example through an activation step, and the two applications need a consistent notion of which account owns which record.
Variants to test
If you are learning to look for this kind of issue, these are the variations worth trying. Each one is a small experiment, and a positive result means the second application returned or changed data belonging to an account created in the first.
- Register in application B with an address already registered in application A, then authenticate. A positive result is that B returns profile data belonging to the A account.
- Check whether registration in either application sends an activation e-mail or otherwise verifies control of the address. Absence of verification widens the attack to addresses the attacker does not own.
- Look for other shared identifiers used as lookup keys, such as usernames or phone numbers, where registration is separate but the data store is common. A positive result is data returned for an identifier registered through the other application.
- Test the write path as well as the read path: if the shared code updates personal data after registration, check whether an account created in B can modify the record of an account created in A. A positive result is a change visible in A.
Where several applications in scope share a backend, repeat the exercise across each pair.
Glossary
- Application: a website or service you use through a browser, made of pages and the programs behind them.
- Authentication: proving who you are, usually by entering an e-mail address and password.
- Backend data source: the place behind the scenes where data is stored, such as a database, which applications query.
- Bug bounty programme: a scheme where a company pays outside researchers for reporting security problems.
- Domain: the part of a web address after the "www", for example example.com.
- Endpoint: the specific address on a server that handles a particular action, such as sign-up.
- E-mail address as identifier: using an e-mail address as the unique name for an account, so that a lookup by that address finds one record.
- Inter-application vulnerability: a flaw that exists only because two applications are combined, even though each is fine on its own.
- Parameter: a named value sent with a request, such as an e-mail address.
- Payload: the part of a request that carries the data being sent.
- Registration flow: the sign-up process of an application, from filling in the form to the account being created.
- Sensitive personal data: information about a person that could cause harm if exposed, such as contact details or other private records.
- Trust boundary: the line between two parts of a system that are allowed to rely on each other's decisions.
- Activation e-mail: a message sent to the address used at sign-up, with a link that proves the person controls that address.
- Read path and write path: the code that fetches data (read) and the code that changes it (write).
- Scales: the attack gets no harder as the number of targets grows, so a list of addresses can be processed in bulk.