Uncovering the Hidden Attack Surface of Salesforce instances
A Salesforce community site's guest user could query objects like Document and ContentDocument through the Aura endpoint without proper ownership checks, exposing sensitive files such as invoices and CVs. An attacker could then download those files using the returned IDs.
medium.com
Published on medium.com
from my humble experience any Salesforce with unauthenticated functionalities contains misconfigurations and access control issues.
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.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the guest user profile was granted read access to sensitive objects and the Aura endpoint did not enforce record-level ownership checks.
Impact
An unauthenticated attacker could download sensitive documents such as invoices and CVs from the Salesforce instance.
What the attacker needed
Salesforce community with guest access; Aura endpoint reachable
The fix
Salesforce administrators should restrict guest user access to sensitive objects and ensure record-level sharing rules are enforced.
How it was found
- Send a POST request to the Aura endpoint with a message parameter that calls the getItems action for the Document object.
- Decode the message parameter to see the entityNameOrId set to user or Document.
- Observe the JSON response containing document IDs.
- Use the returned IDs with the FileDownload or shepherd download servlets to retrieve the files.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Salesforce sites often let people who are not logged in view some pages. The site talks to the server using a special endpoint that accepts instructions in a JSON message. If the server does not check who is allowed to see which records, someone can ask for files that belong to other people and then download them.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.