Data Theft in Salesforce: Manipulating Public Links
A vulnerability in Salesforce's public link feature allowed unauthenticated attackers to abuse an undocumented Aura API endpoint and perform blind SOQL injection to retrieve sensitive data such as names, email addresses, and phone numbers. The flaw affected virtually any public link and could lead to data theft or leakage.
Published on varonis.com
Varonis Threat Labs uncovered a vulnerability in Salesforce's public link feature that threat actors could exploit to retrieve sensitive data.
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 Aura endpoint behind public links accepted user-supplied field names in the getRecord method and built a SOQL query from them without proper sanitisation, enabling blind SOQL injection.
Impact
An unauthenticated attacker could extract sensitive information, including PII such as names, email addresses, and phone numbers, from Salesforce records linked to public files, potentially leading to data theft or leakage.
What the attacker needed
A public link exists in Salesforce; Attacker has the public link URL; No authentication required
The fix
Salesforce patched the vulnerability for blind SOQL injection in February 2024.
How it was found
- Create a public link for a file in Salesforce.
- Capture the request to the Aura endpoint that retrieves public link information.
- Modify the query parameters to match a different Aura method, such as getConfigData, to test access.
- Use a test with empty actions to determine which methods are allowed.
- Call the getRecord method with injected SOQL subqueries in the fields parameter.
- Use LIKE conditions in the subquery to extract data character by character based on error responses.
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 public links let people share files without logging in. The researchers found that the hidden web service behind these links could be tricked into running extra database queries, letting an attacker slowly extract private information like names and phone numbers. This is called a blind injection because the attacker only sees error messages, not the actual data.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.