**Microsoft Bounty Hunt: From Contacts to Invoices via Guest User Misconfigurations**
A Salesforce customer payment portal allowed unauthenticated guest users to query Contact and Document objects through Aura endpoints, exposing customer PII and invoice document identifiers. Attackers could then download the actual invoice PDFs containing names, emails, billing addresses, financial data and signatures.
Published on d3sca.medium.com
Bug Bounty
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 Microsoft customer payment application built on Salesforce Lightning. The application's purpose is for customers to look up and obtain their invoices. The portal offered a guest-facing option to look up a bill: a visitor fills in a form and, in principle, receives the invoice.
Salesforce Lightning is a component-based framework whose access control depends heavily on tenant configuration. The report deliberately does not re-explain how Aura components talk to the underlying API endpoints, referring instead to the author's earlier write-up, Uncovering the Hidden Attack Surface of Salesforce Instances. The focus here is strictly on configuration.
Setup
No accounts, tools or versions are described beyond a browser session acting as an unauthenticated guest user. The precondition is simply the public guest-facing invoice lookup form. When a user fills in that form, a token is added to the Aura request:
aura.[redacted]
That token is what made the request interesting to the researcher.
Finding it
While analysing the guest invoice lookup, the researcher noticed the aura.token parameter being attached to the Aura request. Using that token, the first object identified was Contact. Customer information, intended to remain strictly private, was retrievable without authentication.

At this point the finding was a PII exposure of Contact records, which the researcher considered sufficient to report. The next day, reasoning that a customer payment portal must hold payment-related information, the researcher went back and tried other objects.
Exploitation
Step 1: enumerate the Contact object
The Aura request below asks the SelectableListDataProviderController for a full-layout list of CONTACT records, with a page size of 2000:
{"actions":[{"id":"123;a","descriptor":"serviceComponent://ui.force.components.controllers.lists.selectableListDataProvider.SelectableListDataProviderController/ACTION$getItems","callingDescriptor":"UNKNOWN","params":{"entityNameOrId":"CONTACT","layoutType":"FULL","pageSize":2000,"currentPage":0,"useTimeout":false,"getCount":false,"enableRowActions":false}}]}
The important parts are entityNameOrId, which selects the object, and layoutType: FULL, which asks for the full record layout rather than a minimal projection. The response returned customer contact information without authentication.
Step 2: pivot to document objects
The same permission boundary also covered document-related objects. The request was repeated with entityNameOrId set to DOCUMENT:
{"actions":[{"id":"123;a","descriptor":"serviceComponent://ui.force.components.controllers.lists.selectableListDataProvider.SelectableListDataProviderController/ACTION$getItems","callingDescriptor":"UNKNOWN","params":{"entityNameOrId":"DOCUMENT","layoutType":"FULL","pageSize":2000,"currentPage":0,"useTimeout":false,"getCount":false,"enableRowActions":false}}]}
This returned document IDs inside a JSON file, which immediately elevated the finding from contact exposure to unauthorised access to core business documents.
Step 3: download the invoices
With a document ID in hand, the following endpoint retrieves the file:
/servlet/servlet.FileDownload?file=ID
Substituting an enumerated ID for ID downloads the customer invoice. Because the objects were exposed, unauthenticated users could enumerate document identifiers and download the actual invoice files.
Root cause
The guest user permissions were overly permissive, exposing object access. The same permission boundary that exposed Contact also exposed document-related objects, so the misconfiguration was not limited to a single object. Using the token from the form, the researcher could list records without authentication. In Salesforce terms, the principle of least privilege was inadvertently bypassed for the guest user profile; the report frames this as a configuration gap rather than a code flaw.
Impact
The exposed document records were direct references to customer invoice PDFs. The downloaded documents contained:
- Customer names and email addresses
- Billing addresses
- Detailed invoice line items and financial data
- Authorised business signatures

This demonstrated that the misconfiguration affected highly confidential, legally binding business records, not just isolated, static customer attributes. The report lists the compounding risks:
- Broken access control: least privilege was inadvertently bypassed.
- Cross-customer data exposure: the potential for one customer to view another's financial records.
- Automated data harvesting: once document identifiers are discoverable via exposed objects, an attacker can script the retrieval of thousands of documents before any rate-limiting or monitoring triggers.
- Secondary attacks: financial details and business signatures lower the barrier for targeted phishing, identity fraud and financial fraud.
- Regulatory friction: unnecessary exposure of PII and financial data invites scrutiny under frameworks such as GDPR and CCPA.
Fix
The report presents remediation as straightforward and aligned with Salesforce security best practices:
- Apply least privilege: remove unnecessary object and field-level permissions from the Guest User profile immediately.
- Restrict sensitive objects: explicitly deny Guest User access to
Contactand document-related objects (e.g.ContentDocument,ContentVersion). - Audit field-level security (FLS): ensure sensitive fields are not inadvertently marked as readable by public profiles.
- Review sharing rules and Apex: validate that no custom Apex classes or sharing rules inadvertently bypass object-level security for unauthenticated users.
- Proactive testing: periodically test public-facing sites using a fresh, unauthenticated browser session to confirm the front door actually locks.
Variants to test
- Other objects through the same list controller. Replay the
getItemsaction with differententityNameOrIdvalues on any guest-facing Lightning site. A positive result is a JSON response containing records the guest should not see. - Guest form token reuse. Fill in any public form that issues an
aura.tokenand reuse that token against other Aura actions. A positive result is a successful response to an action the form never intended to call. - Document download endpoint. For any enumerated document ID, request
/servlet/servlet.FileDownload?file=IDwithout authentication. A positive result is a file download rather than a login redirect or error. - Field-level security on public profiles. Check whether sensitive fields are readable by the guest profile even when object access looks correct. A positive result is sensitive field values appearing in a guest response.
What happened, in plain words
A security researcher was looking at a Microsoft website that customers use to find and download their invoices. The site is built on Salesforce, a large online platform that companies use to store customer records, documents and other business data. The site had a form that anyone could fill in, even without logging in, to look up a bill.
While poking at that form, the researcher noticed that the site handed out a small piece of data called a token. That token was added to the Aura request, and it turned out to be interesting. With it, the researcher could ask the site for lists of customer records and, later, for lists of documents. Those documents were real customer invoices, complete with names, email addresses, billing addresses, invoice line items and business signatures. None of this required a login.
The root cause was overly permissive guest user permissions: the anonymous visitor had more access than needed. The fix is to take those permissions away.
This article walks through the same steps the researcher took, explaining each concept from scratch along the way.
Background: what Salesforce Lightning is, and why configuration matters
Salesforce is a cloud service where a company stores its business data: contacts, accounts, invoices, documents, and so on. Each company that uses Salesforce is called a tenant, meaning its own separate slice of the platform with its own data and its own settings.
Salesforce Lightning is the modern, component-based way Salesforce builds its screens. Think of a webpage assembled from many small building blocks (components), each of which fetches its own data in the background. When you click something on a Lightning page, the browser does not reload the whole page. Instead, a component quietly sends a request to Salesforce's servers and gets data back.
Those background requests are the key idea here. They are examples of an API (Application Programming Interface): a way for one piece of software to ask another for data in a structured format, usually without any human clicking through screens. An everyday comparison: a restaurant menu is an API. You do not walk into the kitchen; you pick an item from the menu and the kitchen sends it out. The menu defines what you can ask for and how.
Salesforce's Lightning components talk to the server through a mechanism called Aura. Aura requests are the messages the browser sends to Salesforce to fetch data for a component. Whether those requests are allowed to return sensitive data depends almost entirely on how the tenant has been configured, that is, on the settings the company chose, not on the code of the application itself.
The researcher had already written a separate article about how Aura components communicate with the underlying API endpoints, titled Uncovering the Hidden Attack Surface of Salesforce Instances, so this report does not repeat that. It focuses only on the configuration side: which permissions were granted, and to whom.
The starting point: a public invoice lookup form
The target was a Microsoft customer payment application built on Salesforce Lightning. Its purpose is simple: customers come to look up and obtain their invoices. The portal offered a guest-facing option to look up a bill. "Guest-facing" means it is available to anyone who visits the site, without logging in. A visitor fills in a form and, in principle, receives the invoice.
No special accounts, tools or software versions were needed to investigate this. The only precondition was that public form. The researcher acted as an unauthenticated guest user, meaning someone with no login at all.
When a user fills in that form, a token is added to the Aura request:
aura.[redacted]
Line by line, in plain words:
aura.token=is the name of a parameter being sent along with the request. A parameter is a named value attached to a request, like a field on a form.eyJh….etcis the value of that token. The….etcshows the value was shortened for the write-up; the real value is longer.
What is a token? It is a short string of characters that the server gives to the browser and that the browser sends back on later requests, so the server can recognise the request as coming from the same session. An everyday comparison: a token is like the numbered ticket you get at a cloakroom. You do not need to prove who you are each time; you just show the ticket and the attendant hands over the coat. If the ticket is too powerful, it hands over more than your own coat.
That token is what made the request interesting to the researcher. A token being attached to a request is normal. The question is what that token is allowed to do.
Finding it
While analysing the guest invoice lookup, the researcher noticed the aura.token parameter being attached to the Aura request. Using that token, the first object identified was Contact. Customer information, intended to remain strictly private, was retrievable without authentication.
A few terms to unpack:
- An object in Salesforce is a type of record, like a table in a spreadsheet.
Contactis the object that holds people's contact details.DOCUMENTis the object that holds documents. - Retrievable without authentication means anyone, with no login, could ask for and receive that data. This is the heart of the problem.
- PII stands for Personally Identifiable Information: data that can identify a specific person, such as a name, email address or home address.

The image accompanies the finding that customer information was retrievable without authentication.
At this point the finding was a PII exposure of Contact records, which the researcher considered sufficient to report. The next day, reasoning that a customer payment portal must hold payment-related information, the researcher went back and tried other objects. This is a common instinct in security work: if one door is unlocked, check whether the same key opens others.
Exploitation
Step 1: enumerate the Contact object
The Aura request below asks the SelectableListDataProviderController for a full-layout list of CONTACT records, with a page size of 2000:
{"actions":[{"id":"123;a","descriptor":"serviceComponent://ui.force.components.controllers.lists.selectableListDataProvider.SelectableListDataProviderController/ACTION$getItems","callingDescriptor":"UNKNOWN","params":{"entityNameOrId":"CONTACT","layoutType":"FULL","pageSize":2000,"currentPage":0,"useTimeout":false,"getCount":false,"enableRowActions":false}}]}
Line by line, in plain words:
- The whole thing is JSON, a text format for structured data. It uses curly braces
{}for objects (groups of named values) and square brackets[]for lists. An everyday comparison: JSON is like a well-labelled packing list, where every item has a name and a value. "actions"is a list of actions the browser wants the server to perform. Here there is one action."id":"123;a"is just a label for this action, so the response can be matched to the request. It is not a secret."descriptor"names the server-side piece of code to run. The long string points toSelectableListDataProviderController, a standard Salesforce component that returns lists of records. TheACTION$getItemspart means "run the action called getItems", that is, "give me the items"."callingDescriptor":"UNKNOWN"is a field the browser sends; here it is simplyUNKNOWN."params"holds the settings for the action. This is where the interesting choices are."entityNameOrId":"CONTACT"selects which object to list. This is the single most important value: change it and you ask for a different kind of record."layoutType":"FULL"asks for the full record layout, meaning all the fields, rather than a minimal set. More fields means more data returned."pageSize":2000asks for up to 2000 records in one go. A large page size means a lot of data in a single response."currentPage":0asks for the first page of results."useTimeout":false,"getCount":falseand"enableRowActions":falseare switches that turn off a timeout, turn off a count of total records, and turn off per-row actions. They are not central to the finding.
The important parts are entityNameOrId, which selects the object, and layoutType: FULL, which asks for the full record layout rather than a minimal projection. The response returned customer contact information without authentication.
Why take this step? Because the researcher had a token from the public form and wanted to see what the server would accept from it. Sending a list request for CONTACT is a direct test: if the server answers with real customer records, the guest user has been given too much power.
Step 2: pivot to document objects
The same permission boundary also covered document-related objects. The request was repeated with entityNameOrId set to DOCUMENT:
{"actions":[{"id":"123;a","descriptor":"serviceComponent://ui.force.components.controllers.lists.selectableListDataProvider.SelectableListDataProviderController/ACTION$getItems","callingDescriptor":"UNKNOWN","params":{"entityNameOrId":"DOCUMENT","layoutType":"FULL","pageSize":2000,"currentPage":0,"useTimeout":false,"getCount":false,"enableRowActions":false}}]}
Line by line, in plain words:
- The request is identical to the previous one except for one value.
"entityNameOrId":"DOCUMENT"now asks for theDOCUMENTobject instead ofCONTACT. Everything else, the controller, the full layout, the page size of 2000, stays the same.
Why take this step? Because a payment portal must store invoices somewhere, and invoices are documents. If the guest user could list contacts, it might also be able to list documents. Changing one value in a request is a cheap experiment with a potentially large payoff.
This returned document IDs inside a JSON file, which immediately elevated the finding from contact exposure to unauthorised access to core business documents. A document ID is a unique identifier for a file stored in Salesforce. On its own it is just a label, but if there is a way to turn an ID into a file download, the label becomes a key.
Step 3: download the invoices
With a document ID in hand, the following endpoint retrieves the file:
/servlet/servlet.FileDownload?file=ID
Line by line, in plain words:
/servlet/servlet.FileDownloadis the path on the server that handles file downloads. A servlet is a small program on a web server that handles a particular kind of request. This one is named for what it does: download a file.?file=IDis the part after the question mark, called the query string. It passes a parameter namedfilewith the valueID. In a real request,IDwould be replaced with an actual document identifier obtained from the previous step.
Why take this step? Because a list of document IDs is only a list until you can fetch the files. This endpoint is the bridge between "I can see there are documents" and "I can read the documents".
Substituting an enumerated ID for ID downloads the customer invoice. Because the objects were exposed, unauthenticated users could enumerate document identifiers and download the actual invoice files. To enumerate means to go through values one by one, here document IDs, collecting what comes back.
Root cause
The guest user permissions were overly permissive, exposing object access. A profile in Salesforce is a bundle of permissions assigned to a type of user. The guest user profile is the one applied to anonymous visitors. If it grants access to an object, every anonymous visitor gets that access.
The same permission boundary that exposed Contact also exposed document-related objects, so the misconfiguration was not limited to a single object. Using the token from the form, the researcher could list records without authentication.
In Salesforce terms, the principle of least privilege was inadvertently bypassed for the guest user profile. Least privilege is the idea that every user or program should have only the permissions it actually needs, nothing more. An everyday comparison: a hotel cleaner needs a key to the rooms they clean, not a master key to every room and the safe. The report frames this as a configuration gap.
Impact
The exposed document records were direct references to customer invoice PDFs. The downloaded documents contained:
- Customer names and email addresses
- Billing addresses
- Detailed invoice line items and financial data
- Authorised business signatures

The image accompanies the finding that the documents held personal details and business signatures.
This demonstrated that the misconfiguration affected highly confidential, legally binding business records, not just isolated, static customer attributes. The report lists the compounding risks:
- Broken access control: least privilege was inadvertently bypassed. Access control is the set of rules deciding who may see what; here the rules existed but were set too loosely.
- Cross-customer data exposure: the potential for one customer to view another's financial records. If everyone shares the same guest permissions, everyone sees the same pool of data.
- Automated data harvesting: once document identifiers are discoverable via exposed objects, an attacker can script the retrieval of thousands of documents before any rate-limiting or monitoring triggers. Rate-limiting is a cap on how many requests a server will answer in a given time; monitoring means watching for unusual activity. If neither is in place, a script can work through IDs quickly.
- Secondary attacks: financial details and business signatures lower the barrier for targeted phishing, identity fraud and financial fraud. Phishing is a scam message designed to trick someone into handing over information or money; real invoice details make such a message far more convincing.
- Regulatory friction: unnecessary exposure of PII and financial data invites scrutiny under frameworks such as GDPR and CCPA. These are privacy laws that set rules for handling personal data; GDPR is the European Union's data protection regulation and CCPA is California's consumer privacy law.
Fix
The report presents remediation as straightforward and aligned with Salesforce security best practices:
- Apply least privilege: remove unnecessary object and field-level permissions from the Guest User profile immediately. Field-level permissions control access to individual fields within a record, not just the record as a whole.
- Restrict sensitive objects: explicitly deny Guest User access to
Contactand document-related objects (e.g.ContentDocument,ContentVersion). These are Salesforce's standard objects for storing files and their versions. - Audit field-level security (FLS): ensure sensitive fields are not inadvertently marked as readable by public profiles. An audit here means a systematic check of the settings.
- Review sharing rules and Apex: validate that no custom Apex classes or sharing rules inadvertently bypass object-level security for unauthenticated users. Apex is Salesforce's programming language for custom logic; sharing rules decide which records are visible to which users.
- Proactive testing: periodically test public-facing sites using a fresh, unauthenticated browser session to confirm the front door actually locks. A fresh session means a browser with no cookies or logins, exactly what a stranger would have.
Variants to test
These are the same ideas applied more widely, useful if you want to check a similar site yourself. Only test sites you are authorised to test, such as those covered by a bug bounty programme.
- Other objects through the same list controller. Replay the
getItemsaction with differententityNameOrIdvalues on any guest-facing Lightning site. A positive result is a JSON response containing records the guest should not see. - Guest form token reuse. Fill in any public form that issues an
aura.tokenand reuse that token against other Aura actions. A positive result is a successful response to an action the form never intended to call. - Document download endpoint. For any enumerated document ID, request
/servlet/servlet.FileDownload?file=IDwithout authentication. A positive result is a file download rather than a login redirect or error. - Field-level security on public profiles. Check whether sensitive fields are readable by the guest profile even when object access looks correct. A positive result is sensitive field values appearing in a guest response.
Glossary
- API (Application Programming Interface): a defined way for one piece of software to ask another for data or actions, usually in a structured format.
- Apex: Salesforce's programming language for writing custom logic on the platform.
- Audit: a systematic check of settings or code against a standard.
- Aura: the framework Salesforce Lightning components use to send requests to the server and receive data back.
- Authentication: proving who you are, usually by logging in. Unauthenticated means no login at all.
- Authorised business signature: a signature on a business document, such as an invoice, that makes it legally binding.
- Broken access control: a flaw where the rules deciding who may see or do what are missing or too loose.
- CCPA: the California Consumer Privacy Act, a privacy law governing personal data.
- Component: a self-contained building block of a user interface that fetches and displays its own data.
- Configuration: the settings a company chooses for its platform, as opposed to code it writes.
- Contact: a Salesforce object holding a person's contact details.
- ContentDocument / ContentVersion: Salesforce's standard objects for storing files and their versions.
- Cross-customer data exposure: one customer being able to see another customer's data.
- Document ID: a unique identifier for a stored file.
- Endpoint: a specific address on a server that handles a particular kind of request.
- Enumerate: to go through values one by one, collecting what comes back.
- Field-level security (FLS): rules controlling access to individual fields within a record.
- Fresh session: a browser with no cookies or logins, as a stranger would have.
- GDPR: the European Union's General Data Protection Regulation, a privacy law.
- Guest user: the anonymous visitor a site treats everyone as before they log in.
- Guest user profile: the bundle of permissions applied to anonymous visitors.
- JSON: a text format for structured data using curly braces for named values and square brackets for lists.
- Least privilege: the principle that every user or program should have only the permissions it needs.
- Lightning: Salesforce's modern, component-based user interface framework.
- Monitoring: watching for unusual activity on a system.
- Object: a type of record in Salesforce, like a table in a spreadsheet.
- Parameter: a named value attached to a request.
- Phishing: a scam message designed to trick someone into handing over information or money.
- PII (Personally Identifiable Information): data that can identify a specific person.
- Profile: a bundle of permissions assigned to a type of user.
- Query string: the part of a URL after the question mark, carrying parameters.
- Rate-limiting: a cap on how many requests a server will answer in a given time.
- Remediation: the fix applied to close a security issue.
- Servlet: a small program on a web server that handles a particular kind of request.
- Sharing rules: Salesforce settings deciding which records are visible to which users.
- Tenant: one company's separate slice of a shared cloud platform, with its own data and settings.
- Token: a short string the server gives the browser and the browser sends back, so the server can recognise the session.
- Unauthenticated: with no login, as an anonymous visitor.