CVE-2025-9844

Salesforce · Salesforce CLI on Windows

A high-severity vulnerability has been identified in the Salesforce Command Line Interface (CLI) on Windows systems.

Executive summary

A high-severity vulnerability has been identified in the Salesforce Command Line Interface (CLI) on Windows systems. This flaw could allow an attacker who has gained initial access to a user's machine to execute malicious code by tricking the application into loading an unauthorized file. Successful exploitation could lead to a complete system compromise, enabling the attacker to steal sensitive data, install ransomware, or move further into the network.

Vulnerability

This vulnerability, classified as an Uncontrolled Search Path Element (CWE-427), exists in how the Salesforce CLI for Windows searches for required executable files or libraries. The application does not properly validate the path to these resources, causing it to search in the current working directory before system-defined directories. An attacker can exploit this by placing a maliciously crafted executable (e.g., a DLL or EXE) in a directory where a user is likely to run the CLI, such as a 'Downloads' folder. When the user executes a CLI command from that location, the vulnerable application will load and run the attacker's malicious file instead of the legitimate one, leading to arbitrary code execution with the permissions of the logged-in user.

Business impact

This vulnerability is rated as High severity with a CVSS score of 8.8. Exploitation could have a significant negative impact on the business. Since the Salesforce CLI is often used by developers and administrators with privileged access, a compromise of their workstations could lead to the theft of critical credentials, API keys, and source code. An attacker could leverage this access to steal or tamper with sensitive customer data within the Salesforce environment, disrupt CI/CD pipelines, or use the compromised machine as a staging point for lateral movement across the corporate network, potentially leading to a widespread security breach.

Remediation

Immediate Action: Apply vendor security updates immediately to all affected Windows systems running the Salesforce CLI. After patching, monitor for any signs of exploitation attempts by reviewing system and application access logs for unusual activity.

Proactive Monitoring:

  • Process Monitoring: Monitor for Salesforce CLI processes (sf.exe or sfdx.exe) that spawn unexpected child processes or load DLLs from non-standard locations (e.g., user profile directories, temporary folders).
  • Endpoint Detection: Utilize an Endpoint Detection and Response (EDR) solution to alert on suspicious file creation events, especially for executables or DLLs with names matching legitimate system files being written to untrusted directories.
  • Network Traffic: Scrutinize outbound network traffic from developer workstations and build servers for connections to unknown or suspicious destinations.

Compensating Controls:

  • Application Control: If patching is delayed, implement application whitelisting (e.g., AppLocker) to prevent the execution of unauthorized executables from user-writable directories.
  • User Training: Advise developers and administrators to avoid running CLI commands from untrusted locations, such as their 'Downloads' folder.
  • Directory Permissions: Harden permissions on folders where the CLI is typically run to prevent low-privileged users from writing files into them.

Exploitation status

Public Exploit Available: false

Analyst recommendation

Given the high CVSS score of 8.8 and the critical role of the affected software, this vulnerability poses a significant risk to the organization. The Salesforce CLI is a key tool for developers and administrators, making their workstations high-value targets. Although this CVE is not currently listed on the CISA KEV catalog, its potential for enabling arbitrary code execution and system takeover warrants immediate attention. We strongly recommend prioritizing the deployment of the vendor-supplied patches to all Windows systems with the Salesforce CLI installed, focusing first on developer workstations and critical CI/CD infrastructure.