Defending Against Salesforce OAuth Attacks With SquareX

Over the past several months, Google Cloud Threat Intelligence has been tracking a campaign abusing Salesforce CRM integrations has caused a wave of breaches affecting prominent companies worldwide such as Adidas, Dior, and Google itself with the latest disclosure coming from Workday, a leading HR and financial software provider.
Customer Relationship Management (CRM) platforms are software systems that act as the backbone of business operations, storing and organizing critical information about both customers and employees. As the world’s largest CRM, Salesforce underpins the operations of over 150,000 organizations worldwide, meaning this ongoing campaign has the potential to affect thousands of organizations spanning multiple industries from financial services to government agencies.
Unlike traditional phishing or ransomware attacks, this campaign exploits OAuth integrations within Salesforce’s Connected Apps framework, the trusted mechanism Salesforce uses to connect external apps and cloud services.
What is OAuth?
OAuth or Open Authorization allows one application to grant another application access to their assets without sharing any usernames or passwords. Instead of handing over credentials, OAuth uses authorization tokens, to allow 3rd party apps to act on the user’s behalf based on certain approved permissions (OAuth scopes). It has become the standard protocol for third party integration used by organizations today as it avoids the risks of password sharing, reduces the chance of supply chain compromise, and allows administrators to set granular permissions, deciding exactly what each external app can and cannot access.
Particular to this attack, Salesforce is using a non-standard OAuth setup, supporting 3rd-party app integrations through its own custom Connected Apps Framework.
Salesforce Connected Apps Framework
Salesforce’s Connected Apps Framework defines how both Salesforce-built tools and third-party apps integrate with the platform through APIs and OAuth tokens. These apps can be local apps or SaaS apps.
Example Flow for Connecting a Connected App with OAuth:
- The app generates an 8-digit user code that identifies which app is requesting access.
- The user is directed to Salesforce’s setup page at https://login.salesforce.com/setup/connect to enter that code.
3. The user logs into their Salesforce account
4. Salesforce then shows a consent screen listing the app and its requested permissions.
5. If the user clicks Approve, Salesforce issues an OAuth token to that app with the requested permissions.
This process works well when the app is trustworthy, providing a secure, streamlined way for the app to access Salesforce assets. However, if a malicious app is approved by a user, it gains the same level of access as a legitimate tool and Salesforce will honor its access without needing stolen passwords, without bypassing MFA, and without raising alarms.
That is exactly what attackers are exploiting in this wave of breaches: turning OAuth integrations from a security convenience into a direct pipeline for large-scale data theft.
Data Loader
The attacker primarily weaponizes the Salesforce Data Loader, a popular tool provided by Salesforce itself. Data Loader is integrated through the Connected Apps framework and authorized via OAuth. Developed by Salesforce to efficiently import, export, and update large data volumes within the Salesforce platform, the Data Loader is authorized to directly access and move very large volumes of Salesforce data. This makes it a powerful tool for both Salesforce developers and attackers alike.
The attackers exploit a key weakness in the Connected Apps system: the user can authorize any instance of the Data Loader, even ones not running on their device. Since the Data Loader tool is freely downloadable, attackers simply install it on their own machines, generate a code tied to that instance, and then trick victims into entering the code into their Salesforce setup page with nothing more than basic social engineering. Once approved, the Data Loader on the attacker’s device is bound directly to the user’s device, granting OAuth permissions to their organization’s Salesforce data. More recently, attackers have extended this tactic beyond Data Loader, creating custom malicious connected apps that abuse the exact same OAuth approval flow.
The Salesforce OAuth Attack
Phase 1: Initial Access
The attack starts with exploiting the weakest link in any enterprise: humans. Using various social engineering techniques, the attacker manipulates the victim to take actions on the Salesforce setup page. For example, the attacker sends a phishing email that claims there is an urgent issue with Salesforce that requires immediate action, referencing a non-existent support ticket for credibility. The email contains the attacker’s Data Loader device code and directs the user to enter it in https://login.salesforce.com/setup/connect to resolve the issue.
Phase 2: Linking Malicious Data Loader
The unsuspecting victim follows the instructions, entering the provided code at https://login.salesforce.com/setup/connect. Unbeknownst to the victim, this code corresponds to the Data Loader on the attacker’s machine (or a custom malicious connected app). When the victim logs in and clicks Approve, they grant the attacker’s malicious app OAuth permissions to their Salesforce enterprise. To the victim, nothing seems suspicious as the permissions requested match exactly what their real Data Loader would need.
Phase 3: Data Breach
With OAuth tokens in hand, the attacker’s app now has API-level access to the user’s salesforce organization. That means the malicious app can:
- Export bulk data like customer records, financial data, employee and customer information
- Import or update records, potentially corrupting or overwriting legitimate data
This results in large-scale breaches, and in some incidents, ransom demands as attackers lock down critical records.
Phase 4: Lateral Movement
Following the initial data theft, researchers have also observed the attacker leveraging end-user credentials obtained through the breach to move laterally into victim’s accounts on other cloud platforms such as Okta and Microsoft 365.
Reuters reports that the campaign has so far affected 20 organizations, leading to the exposure of millions of records.
Mitigation: Blocking Apps Requesting Risky OAuth Permissions
Apps like Data Loader require high-privilege permissions such as API access which allow them to manage and extract massive volumes of Salesforce data via APIs. These elevated permissions are exactly what make this attack so powerful, enabling large-scale data exfiltration, major breaches, and even ransomware extortion.
To mitigate this risk, use a browser security solution like SquareX, which can inspect the OAuth scopes an external app is requesting and automatically block the connection to Salesforce if high-risk permissions are detected. If an employee genuinely needs an app with these elevated scopes, they can submit an exception request, allowing the security team to review the app, verify its legitimacy, and ensure it is running on the employee’s own device before granting access, all of which can also be managed through the SquareX platform.
Sources
- https://cloud.google.com/blog/topics/threat-intelligence/voice-phishing-data-extortion?rev=7194ef805fa2d04b0f7e8c9521f97343
- https://www.salesforce.com/blog/protect-against-social-engineering/
- https://www.varonis.com/blog/what-is-oauth
- https://www.bleepingcomputer.com/news/security/hr-giant-workday-discloses-data-breach-amid-salesforce-attacks/
- https://help.salesforce.com/s/articleView?id=xcloud.connected_app_create.htm&type=5
- https://help.salesforce.com/s/articleView?id=xcloud.connected_app_overview.htm&type=5
- https://www.reuters.com/sustainability/boards-policy-regulation/hackers-abuse-modified-salesforce-app-steal-data-extort-companies-google-says-2025-06-04/
- https://cloudprotection.withsecure.com/blog/salesforce-attacks-in-2025/
Defending Against Salesforce OAuth Attacks With SquareX was originally published in SquareX Labs on Medium, where people are continuing the conversation by highlighting and responding to this story.

