Skip to main content
Vulnerability Database/CVE-2024-35281

CVE-2024-35281: Fortinet FortiClient RCE Vulnerability

CVE-2024-35281 is a remote code execution flaw in Fortinet FortiClient that allows authenticated attackers to inject code via Electron environment variables. This article covers technical details, affected versions, security impact, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2024-35281 Overview

CVE-2024-35281 is an improper isolation or compartmentalization vulnerability [CWE-653] affecting Fortinet FortiClientMac and FortiVoiceUCDesktop desktop applications. The flaw resides in how these Electron-based applications handle environment variables at runtime. An authenticated local attacker can inject malicious code into the Electron process by manipulating environment variables consumed during application startup. Successful exploitation yields high-impact compromise of confidentiality, integrity, and availability on the affected endpoint.

Critical Impact

Authenticated local attackers can inject arbitrary code into trusted Fortinet client processes on macOS, enabling privilege context abuse and persistent control of the endpoint.

Affected Products

  • Fortinet FortiClientMac 7.4.2 and below
  • Fortinet FortiClientMac 7.2.8 and below, and all 7.0 versions
  • Fortinet FortiVoiceUCDesktop 3.0, all versions

Discovery Timeline

  • 2025-05-13 - CVE-2024-35281 published to the National Vulnerability Database
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-35281

Vulnerability Analysis

FortiClientMac and FortiVoiceUCDesktop are built on the Electron framework, which bundles a Chromium renderer and Node.js runtime into a desktop application. Electron honors several environment variables that alter how the runtime loads code, including variables that can point the Node.js process at attacker-controlled scripts or modules. The affected Fortinet applications do not strip or sanitize these variables before launching their Electron processes.

An authenticated attacker with local access can set these variables in their user session and then launch or trigger the vulnerable application. The Electron runtime will load the attacker-supplied code into the trusted application context. Because the Fortinet clients handle VPN credentials, voice communications, and endpoint policy enforcement, injected code runs alongside sensitive data and privileged functionality.

Root Cause

The root cause is improper compartmentalization between the user's environment and the Electron runtime. Fortinet's launcher does not clear sensitive Electron and Node.js environment variables such as those controlling preload scripts, module paths, or inspector interfaces before spawning the application. This violates the trust boundary between the untrusted user profile and the signed application.

Attack Vector

Exploitation requires local access and valid authentication on the macOS host. The attacker sets Electron-interpreted environment variables in their shell or launch agent, then starts the vulnerable Fortinet application. The code executes with the privileges of the user running the application. The attack vector is local with low complexity, requiring no user interaction beyond application launch.

No verified public proof-of-concept code is available. See the Fortinet Incident Response Advisory FG-IR-24-025 for vendor-authored technical details.

Stop Remote Code Execution Before It Runs

Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.

Stop Exploit Attempts

Detection Methods for CVE-2024-35281

Indicators of Compromise

  • Unexpected environment variables such as NODE_OPTIONS, ELECTRON_RUN_AS_NODE, or NODE_PATH set in user shell profiles, LaunchAgents, or LaunchDaemons on macOS endpoints running FortiClient.
  • Child processes spawned by FortiClient.app or FortiVoiceUCDesktop that load scripts or dynamic libraries from user-writable paths.
  • Outbound network connections from FortiClient processes to destinations unrelated to Fortinet infrastructure.

Detection Strategies

  • Monitor process creation events for Fortinet Electron binaries and inspect their inherited environment for Node.js and Electron variables.
  • Alert on modifications to ~/Library/LaunchAgents, ~/.zshenv, ~/.bash_profile, and similar persistence locations that export Electron variables.
  • Correlate FortiClient process launches with recent file writes to script paths referenced by environment variables.

Monitoring Recommendations

  • Centralize macOS endpoint telemetry including process arguments, environment inheritance, and file integrity events for the FortiClient and FortiVoiceUCDesktop application bundles.
  • Baseline normal FortiClient child-process behavior and flag deviations such as unexpected node or shell invocations.
  • Review authentication logs for the local accounts preceding anomalous FortiClient launches to identify the originating session.

How to Mitigate CVE-2024-35281

Immediate Actions Required

  • Upgrade FortiClientMac to version 7.4.3 or later, or 7.2.9 or later, per the vendor advisory.
  • Retire FortiClientMac 7.0.x deployments, as no fixed branch is listed for that major version.
  • Migrate FortiVoiceUCDesktop 3.0 users to a vendor-supported fixed release once available.
  • Audit macOS endpoints for persistent Electron and Node.js environment variables and remove any that are not operationally required.

Patch Information

Fortinet documents the affected versions and fixed releases in Fortinet PSIRT advisory FG-IR-24-025. Administrators should deploy the fixed FortiClientMac builds through their standard macOS software distribution channels and confirm the installed version via codesign and application metadata after upgrade.

Workarounds

  • Restrict interactive and SSH access to macOS endpoints running vulnerable FortiClient versions until patching is complete.
  • Enforce managed shell profiles that prevent users from exporting NODE_OPTIONS, ELECTRON_RUN_AS_NODE, and related variables.
  • Use macOS configuration profiles to restrict LaunchAgent creation by standard users where feasible.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.