Skip to main content

What an installed managed package can read in your org

In August 2025, Google's threat intelligence team reported that an actor had used OAuth tokens tied to the Salesloft Drift application to export large volumes of data from numerous corporate Salesforce instances, then searched the data for secrets such as AWS keys and passwords. In November, Salesforce disabled the connection between Gainsight-published applications and Salesforce after unusual activity through them. In both cases, Salesforce said the cause was not a vulnerability in the platform.

The common thread is that the attacker did not need to break into Salesforce. They used access that customers had granted to a vendor. A managed package and the integration that comes with it are the most common way that access is granted, and few teams can say exactly what their installed packages can reach. This post lists the five routes a package uses and how to review each one.

What happened in 2025, briefly

Google Threat Intelligence Group's write-up on the Drift campaign puts the activity between 8 and 18 August 2025. On 20 August, Salesloft and Salesforce revoked all active access and refresh tokens for the Drift application, and Salesforce removed it from AppExchange. GTIG advised treating every token connected to Drift as potentially compromised, not only the Salesforce one.

Salesforce's Gainsight advisory describes unusual activity involving Gainsight-published applications connected to Salesforce, which Salesforce disconnected on 20 November 2025 while it investigated.

The lesson for every org is the same: the blast radius of a vendor compromise is whatever the vendor's access can read. That is decided by you, at install time and afterwards.

The five routes a package uses

Route What it can reach Where you control it
Package Apex Anything Apex can reach in system context; source is hidden Choosing the package; which users can run its entry points
Package permission sets and profile settings The objects, fields and system permissions they grant Install option, then permission set assignment
Remote site settings and CSP trusted sites External endpoints package code can call The approval screen at install
Connected apps or external client apps OAuth access for the vendor's own service App policies: permitted users, scopes, IP, refresh tokens
The vendor's integration user Whatever that user's profile and permission sets allow You create and license it

1. Package Apex

Apex in a managed package runs in system context like any other Apex, and classes declared without sharing ignore record sharing. The source is hidden from subscribers, so you cannot read it. AgentExchange Security Review (formerly AppExchange) tests a package before it is listed, but that review is a point in time and does not cover what the vendor's servers do with your data. What you can control is who runs the package: its Lightning pages, Visualforce pages, Apex REST endpoints and flows are only reachable by users with access to them.

2. Permission sets and profile settings

The installer offers three options: Install for Admins Only, Install for All Users and Install for Specific Profiles. "All Users" applies the package's access settings to every internal custom profile at once. "Admins Only" keeps access with administrators and leaves you to assign the package's permission sets to the people who need them, which is almost always the right choice. The Salesforce CLI defaults to admins only as well.

Package permission sets arrive with whatever the publisher put in them. Some grant View All or Modify All on their own objects, which is expected. Some grant org-wide permissions such as View All Data, which deserves a question to the vendor.

3. Remote sites and trusted sites

If a package includes remote site settings, the installer must approve access to those external websites before continuing. That screen is the clearest statement you will get of where package code can send data. Read it, and look the domains up. After install, the list is in Setup under Remote Site Settings and CSP Trusted Sites, each with the package namespace.

4. Connected apps installed with the package

Many packages come with a connected app or external client app that lets the vendor's cloud service call your org's APIs. The vendor holds the tokens. This is the route the 2025 campaigns used. Since September 2025, Salesforce has blocked uninstalled connected apps for most users, which makes the installed app the main path. Set its policies yourself: admin approved users only, the narrowest scopes the vendor supports, IP restrictions to the vendor's published egress ranges, and a refresh token policy that expires idle tokens.

5. The vendor's integration user

Vendors often ask for a dedicated user, and often ask for it to be an administrator "to make setup easier". The tokens the vendor holds act as this user. Give it an API-only profile and a permission set limited to the objects the integration syncs, never Modify All Data or View All Data.

Before you install

  • Read the AppExchange listing for the security review status and the data the app sends off-platform.
  • Install in a sandbox first and read every screen: components, API access, remote sites.
  • Choose Install for Admins Only.
  • Ask the vendor four questions in writing: what data leaves the org, where it is stored, how OAuth tokens are protected, and which IP ranges their service calls from.

After you install: the inventory

List installed packages, then each package's permission sets and remote sites:

sf package installed list --target-org prod

sf data query --target-org prod --query "
  SELECT Name, NamespacePrefix, PermissionsModifyAllData, PermissionsViewAllData,
         PermissionsAuthorApex, PermissionsCustomizeApplication
  FROM PermissionSet
  WHERE NamespacePrefix != null AND IsOwnedByProfile = false"

sf data query --target-org prod --use-tooling-api --query "
  SELECT SiteName, NamespacePrefix, CreatedDate FROM RemoteProxy"

Then find who holds each package's permission sets with a PermissionSetAssignment query filtered on PermissionSet.NamespacePrefix, and check the OAuth tokens each package app holds in Connected Apps OAuth Usage. Write the result down per package: owner, purpose, permission sets and holders, endpoints, connected app and integration user. That page is what you need on the day a vendor sends an incident notice.

On the day a vendor is compromised

Revoke the app's tokens first, then freeze the integration user and investigate. Salesforce noted in the Gainsight advisory that revoking tokens did not delete Setup Audit Trail entries, Event Monitoring logs or API activity records, so revoking first loses nothing. Then rotate any secrets stored in records the integration could read, because the Drift actor went looking for exactly those.

Reviewing packages with Vulkro for Salesforce

The live-org audits read the same inventory through your own sf CLI login, read-only:

vulkro-sf org packages --target-org prod
vulkro-sf org governance --target-org prod --format json-report > governance.json
vulkro-sf org connected-apps --target-org prod --check-compromised

org packages lists installed packages and flags pre-release (SF-PKG-001) and unmanaged (SF-PKG-002) packages. org governance maps what each package can reach: package permission sets that grant org-wide powers (SF-PKG-ACCESS-001) or View All and Modify All on objects (SF-PKG-ACCESS-002), and a per-package footprint of its permission sets, holders, API-only users and connected apps (SF-PKG-ACCESS-003). org connected-apps --check-compromised matches installed apps and token-holding apps by name against the published indicators of the 2025 campaigns, including tokens created before a vendor's published compromise that are still live (SF-OAUTH-IOC-004). A match is a reason to investigate, and no match is not a clearance.

FAQ

Can I see the Apex code in a managed package?

No. Managed package Apex is hidden from subscriber orgs. You can see the package's components, permission sets, remote sites and connected apps, and you control which users can reach its pages and endpoints.

What does Install for Admins Only do?

It gives the package's access settings to administrators only and does not change other profiles. You then assign the package's permission sets to the users who need them, which keeps access deliberate and easy to audit.

Were the 2025 Salesforce data thefts caused by a platform vulnerability?

Salesforce and Google's threat intelligence team both said no. The Drift activity used OAuth tokens tied to a third-party application, and Salesforce said the Gainsight activity did not stem from a platform vulnerability either.

See the org governance reference and the supply chain use case, or start a 14-day trial. Related: connected app hygiene after the 2025 token thefts and who holds Modify All Data.