Fortinet FortiClientLinux VPN Config Symlink/Shared-Object Loading LPE — CVE-2026-24018
by febin0x10 · 2026-07-05
- Severity
- High
- CVE
- CVE-2026-24018
- Category
- binary
- Affected product
- Fortinet FortiClientLinux
- Affected versions
- FortiClientLinux 7.4.0 through 7.4.4, and 7.2.2 through 7.2.12
- Disclosed
- 2026-07-05
- Patch status
- unpatched
Tags
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-03 |
| Author / Researcher | febin0x10 |
| CVE / Advisory | CVE-2026-24018 |
| Category | binary |
| Severity | High |
| CVSS Score | Not specified in source |
| Status | Weaponized |
| Tags | forticlient, linux, symlink-following, local-privilege-escalation, setuid, shared-object-injection, vpn-config, cwe-61 |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | Fortinet FortiClientLinux |
| Versions Affected | FortiClientLinux 7.4.0 through 7.4.4, and 7.2.2 through 7.2.12 |
| Language / Platform | Bash (PoC), Linux x86_64 target |
| Authentication Required | Local-only |
| Network Access Required | No |
Summary
FortiClientLinux allows a VPN connection profile to reference a custom pre/post-connect shared object (.so) file path that gets loaded by a component of the client running with elevated privileges. Because the path is followed without validating ownership/permissions or resolving symlinks safely, a local unprivileged user can create or edit a VPN connection to point the shared-object field at an attacker-controlled .so file (or a symlink to one), whose _init() constructor executes on load. The PoC’s malicious library calls setuid(0)/setgid(0) and then runs an attacker-chosen command via system(), giving the local user a root shell. The script automates crafting the malicious .so (compiling from embedded C source via gcc, or dropping a precompiled base64-embedded ELF if gcc is unavailable), editing/creating the VPN profile via forticlient-cli, and triggering the load either interactively or via a GUI autostart entry for a victim/admin session.
Vulnerability Details
Root Cause
FortiClientLinux’s VPN connection editor accepts a filesystem path for a supplementary shared library and loads it via a privileged process without verifying that the referenced file is owned by a trusted principal or refusing to follow symlinks/attacker-writable paths (a classic untrusted-search-path / symlink-following issue, CWE-61).
Attack Vector
- Local unprivileged user confirms
/opt/forticlientis installed. - The user builds a malicious shared object whose
_init()constructor callssetuid(0),setgid(0), and executes a command viasystem(). - Using
forticlient-cli vpn edit, the user creates or modifies a VPN connection profile to reference the malicious.so(via a symlink at/tmp/evil.soor a direct path) as its plugin/DLL. - The user (or, in the delayed variant, an admin/victim whose session is primed via a
~/.config/autostartdesktop entry) opens/connects via the FortiClient GUI or tray, causing the privileged component to load the malicious shared object. - The
_init()constructor executes with root privileges, running the attacker’s payload (e.g., copying/bin/shto/tmp/shwith the setuid bit set).
Impact
A local unprivileged user can escalate to full root privileges on a host running vulnerable FortiClientLinux, either immediately (self-triggered) or persistently by planting an autostart entry that fires when another user’s GUI session loads FortiClient.
Environment / Lab Setup
Target: FortiClientLinux 7.4.0-7.4.4 or 7.2.2-7.2.12 on Linux (with /opt/forticlient installed)
Attacker: Local shell access, bash, gcc (optional; falls back to an embedded precompiled ELF), forticlient-cli
Proof of Concept
PoC Script
See
exploit.shin this folder.
| |
The script checks for a FortiClient installation, builds (or drops a precompiled) malicious shared object whose constructor escalates privileges and runs a payload script, edits or creates a VPN connection profile to reference it via forticlient-cli, launches the FortiClient GUI/tray to trigger the load, and drops a root-owned setuid shell at /tmp/sh (or optionally installs a ~/.config/autostart entry so the payload fires when a victim’s GUI session next opens FortiClient).
Detection & Indicators of Compromise
forticlient-cli vpn list # look for connections pointing at /tmp or user-writable paths
find / -perm -4000 -newer /opt/forticlient -type f 2>/dev/null
Signs of compromise:
- A setuid root shell binary (e.g.,
/tmp/sh) appearing on disk. - FortiClient VPN profiles configured with plugin/DLL paths outside
/opt/forticlient(e.g.,/tmp/evil.so). - Unexpected entries in
~/.config/autostart/*.desktopreferencing FortiClient binaries, planted by a non-admin user.
Remediation
| Action | Detail |
|---|---|
| Primary fix | Upgrade FortiClientLinux to a version beyond the affected 7.2.x/7.4.x ranges once Fortinet publishes a fix; consult the vendor PSIRT advisory for the exact patched release. |
| Interim mitigation | Restrict local shell access on hosts running FortiClientLinux, monitor VPN profile configuration changes, and audit for non-standard shared-object paths referenced by VPN connections. |
References
Notes
Mirrored from https://github.com/febin0x10/Fortinet_FortiClient_Exploit_CVE-2026-24018 on 2026-07-05. The original repository also included a demo video (FortiClient_exploit.mp4, ~3.6MB); it was excluded from this mirror per archive size/media-handling policy — only the exploit.sh script was copied.
| |