
On 19 November 2025 Salesforce saw API calls it did not like. They came from IP addresses that weren't on any allowlist, and they carried the identity of a connected app published by Gainsight, a customer-success platform that many Salesforce customers had linked to their orgs. Salesforce's answer was blunt: it revoked every active access and refresh token tied to Gainsight-published apps and took them off AppExchange the same day.
Google's threat intelligence group said it knew of more than 200 potentially affected Salesforce instances and linked the activity to UNC6240, the cluster that calls itself ShinyHunters. Gainsight, for its part, said only "a handful" of customers had data affected. Both numbers can be true: tokens being used and data being taken are different counts.
This is the second Salesforce-connected-app incident of 2025, after Salesloft Drift in August. What makes Gainsight worth its own write-up is the part the Drift story didn't have: the age of the tokens, the size of the revocation, and an investigation that ended without finding how they leaked.

What is firmly known, and what is claimed
Three kinds of statement are mixed together in the press coverage. Keeping them apart matters:
• Salesforce (advisory, 19-20 November): it detected suspicious API activity through Gainsight-published connected apps, revoked tokens, removed the apps from AppExchange, and said there was no indication of a flaw in the Salesforce platform.
• Gainsight (CTO write-up and the Mandiant and CrowdStrike summaries, 8 December): the numbers in the table below. These are vendor-published, so they are the vendor's account of what the investigators told it.
• ShinyHunters (Telegram, reported by The Register on 21 November): that they had access to Gainsight "for nearly 3 months", got in with secrets stolen in the Salesloft Drift breach, and that this was "just a test to probe how much monitoring there is now". Unverified. Gainsight's own investigators found no evidence for the Drift link within the logs they could see.
The numbers
• Tokens in the leaked file: 285 Salesforce OAuth tokens (Mandiant received the file on 20 Nov) (Gainsight CTO)
• Token creation dates: Oldest October 2017, newest August 2023 (Gainsight CTO)
• Age at the time of use: About 8 years for the oldest, about 2 years 3 months for the newest (Worked from the dates above (to 19 Nov 2025))
• Bulk validation of tokens: About 250 tokens, 22 October 2025 (Gainsight CTO)
• Use against customer orgs: 16 to 19 November 2025 (Gainsight CTO)
• Salesforce detection and revocation: 19 November 2025 (Salesforce, Gainsight)
• Tokens still present in Gainsight by late November: About 23%; the rest had already been rotated away by customers (Gainsight CTO)
• Salesforce instances Google knew of: More than 200 potentially affected (Google Threat Intelligence, via The Register and Recorded Future)
• Customers Gainsight said had data affected: "A handful" (as of 25 Nov) (Gainsight CEO)
• Investigation concluded: Mandiant 5 Dec, CrowdStrike 4 Dec 2025; no active intruder in the logs, source of the leaked set not identified (Gainsight summaries, 8 Dec)
The age column is the story. A token created in 2017 was still a working key to a customer's Salesforce data in 2025. Nobody had to guess a password or beat a prompt: whoever held the file of tokens, from wherever it came, could present them. And the 23% figure cuts the other way too: customers who had already rotated their tokens were not exposed through that route. Rotation worked. Most customers simply hadn't done it.
How the calls looked from the Salesforce side
• Salesforce flagged calls from IP addresses outside the customer's allowlist, arriving under the Gainsight connected app's identity.
• Recorded Future's write-up lists two of the IPs, 109.70.100[.]68 and 109.70.100[.]71, and says most were Tor exit nodes or commodity proxy and VPN addresses, a few overlapping with infrastructure from the August 2025 UNC6040 vishing campaign.
• The services that lost their Salesforce read and write access during the cut-off were Gainsight Customer Success, Community, Northpass, Skilljar and Staircase.
• Other platforms cut their side as a precaution: Zendesk revoked Gainsight's connector access, Gong and HubSpot disabled their connectors, and the Gainsight app was pulled from the HubSpot Marketplace on 20 November.
The common thread with Drift: the activity looked like the integration, because it was the integration's credential. The one visible difference was where it came from.
Why a token from 2017 still worked
An OAuth refresh token is a long-term permission slip. When someone at a customer clicked Allow years ago, Salesforce issued the app a refresh token, and unless the org's policy says otherwise, a refresh token stays valid until it is revoked. Three settings decide whether that is dangerous:
• Refresh token policy on the connected app: the default "refresh token is valid until revoked" means no expiry at all. Options such as "expire refresh token after 90 days" or "if not used for 7 days" exist.
• IP relaxation: "Relax IP restrictions" lets the token work from any address. "Enforce IP restrictions" ties it to the allowed ranges in the user's profile, so a token replayed from a Tor exit node fails.
• Who is permitted: "All users may self-authorize" versus "Admin approved users are pre-authorized". The second makes every new connection an admin decision.
Gainsight's own fixes show what it considers the gaps: refresh tokens that now rotate every few hours and work only once, trusted-IP restrictions, PKCE on the authorization flow, MFA for all staff, geo-restrictions at the WAF, API gateways and CDN, and alerts on Tor-based key use and mass credential validation.
Audit your own connected apps in 20 minutes
1. List every token and how old it is
In Salesforce, Setup > Connected Apps OAuth Usage shows each app with its user count, use count and last-used date. For the full list with ages, query the OauthToken object (Customize Application permission shows all users' tokens; everyone else sees only their own):
Read it like this: any row with a CreatedDate older than a year is the same class as the 285. Any row with LastUsedDate older than 90 days is a permission nobody uses. Salesforce documents paging for this object: query in batches of 2,000 with LIMIT and OFFSET, and run a COUNT() first because offsets above 2,000 return an error.
2. Revoke what you do not recognise or use
• In Connected Apps OAuth Usage, use Revoke on a user's token or Block on the app.
• Rotating a token costs a reconnect, usually two minutes. Leaving one alive costs the whole exposure window.
• For apps you keep, re-authorise after revoking, so a new token replaces the old one. Gainsight's 23% survivor figure is the number you are trying to beat.
3. Tighten each app you keep
Open Setup > Manage Connected Apps > the app > Edit Policies and set:
• Permitted Users: Admin approved users are pre-authorized.
• IP Relaxation: Enforce IP restrictions, and put the vendor's published IP ranges in the integration user's profile login IP ranges.
• Refresh Token Policy: expire after a fixed time or after inactivity (90 days or less for most apps).
• Give the integration its own user with a permission set limited to the objects it needs, not a System Administrator.
4. Make sure you would see the next one
• Turn on API event logging (Event Monitoring where licensed) and keep it for months, not days. Gainsight's investigators reviewed only a one-year window of their own logs, which is why they could not say where the tokens came from.
• Alert on API calls from a connected app at an IP that is not the vendor's, on bulk exports of Case, Contact and Account, and on a connected app that suddenly runs queries it never ran.
• Keep a one-page runbook: for each integration, who may press revoke and where.
5. Check the other platforms, same day
Salesforce was the headline, but Gainsight also connected to HubSpot and Zendesk, and both cut their side. Whatever you connect from a vendor, look for the same page: Google Workspace Admin console > Security > API controls; Microsoft Entra > Enterprise applications; GitHub organisation > Settings > Installed apps and Authorized OAuth apps.
If you build a product that holds customers' tokens
Gainsight's list after the incident is a fair checklist: short-lived access tokens with one-time refresh rotation, source-IP restriction, PKCE, scanning for credentials that sit in cloud storage, alerts on mass key validation (the October bulk check of about 250 tokens is exactly that pattern), and logs kept longer than a year so that "how did these leak" has an answer. The honest outcome of this investigation was "we don't know". A year of logs was not enough for tokens that were two to eight years old.
Timeline
• October 2017 to August 2023: the 285 tokens are created.
• 22 October 2025: about 250 tokens validated in bulk.
• 16 to 19 November: tokens used to call Salesforce APIs against customer orgs.
• 19 November: Salesforce detects it, revokes all Gainsight-app tokens, removes the apps from AppExchange, contacts Gainsight.
• 20 November: Mandiant engaged and receives the file of 285 tokens; Gainsight app pulled from HubSpot Marketplace.
• 21 November: Google reports 200+ potentially affected instances; ShinyHunters publishes its claims; Zendesk has cut the connector.
• 25 November: Gainsight CEO says "a handful" of customers had data affected.
• 4 and 5 December: CrowdStrike and Mandiant finish; no active threat actor seen in logs.
• 8 December: Gainsight publishes both summaries.
The lesson
Sign-in controls kept getting better in 2025, and none of them were tested here. The way in was a file of old permission slips, and the fix that mattered was a short clock on each one. Review your connected apps like you review your admin accounts: list them, age them, shorten them, and be able to cut them off in minutes.
osec.one makes small security tools for sites without a security team: passwordless sign-in, login rules, scans and CSP reports, each added with a pasted snippet and no DNS move.
See the toolsSources: Gainsight CTO: When OAuth tokens live too long (token ages, 285 tokens, 23%, timeline); Gainsight: Mandiant investigation summary (8 December 2025); Gainsight: CrowdStrike investigation summary; Gainsight CEO update (25 November 2025); The Register: ShinyHunters claims Gainsight access (21 November 2025); Recorded Future: The Salesforce-Gainsight security incident; Cybersecurity Dive: Salesforce investigating Gainsight-connected environments; Salesforce developer docs: OauthToken object.