CLI Path Traversal and Privilege Escalation in Fortinet Products
CVE-2025-61624 is a path traversal vulnerability in the command-line interpreters of Fortinet FortiOS, FortiPAM, FortiProxy, and FortiSwitchManager. An authenticated attacker with an administrator profile and at least read-write permissions can supply specially crafted arguments to existing CLI commands to write or delete arbitrary files outside the intended restricted directory. Affected releases include FortiOS 7.6.0–7.6.4, 7.4.0–7.4.9, and all 7.2, 7.0, and 6.4 releases; FortiProxy 7.6.0–7.6.4, 7.4.0–7.4.11, and all 7.2 and 7.0 releases; FortiPAM 1.7.0 and all 1.0–1.6 releases; and FortiSwitchManager 7.2.0–7.2.7 and 7.0.0–7.0.6. In FortiOS, traversal sequences in auto-script object names allow scripts to be placed outside their intended directory and executed with root privileges. CL-STA-0954, also tracked as UNC5820, exploited the vulnerability to obtain underlying operating-system access and deploy the memory-resident PEERSTITCH implant.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
Arbitrary file modification or deletion can compromise appliance integrity, damage configuration or system data, and disrupt service. Observed FortiOS exploitation escalated restricted administrative access to root-level execution, enabling implant deployment and circumvention of appliance security checks. PEERSTITCH deployment enabled selected VPN sessions to bypass normal security validations while concealing malicious functionality within legitimate processes. These post-exploitation capabilities extend beyond the vulnerability's immediate arbitrary-file-write and deletion primitives.
If you can’t patch tonight, do this now.
Restrict HTTPS, SSH, and CLI administrative access to trusted administrators and dedicated management networks; disable internet-facing administration and minimize read-write administrator accounts. Enable multifactor authentication and review administrative credentials. Where supported, apply Fortinet virtual patch FG-VD-59270.0day through FMWP database update 25.120 as an interim protection. Audit auto-script objects, administrator profiles, VPN sessions, and configuration changes. For suspected PEERSTITCH infections, include live-memory inspection because on-disk integrity checks may not detect the implant.
Patch, then assume compromise.
Upgrade FortiOS 7.6 to 7.6.5 or later and FortiOS 7.4 to 7.4.10 or later; FortiProxy 7.6 to 7.6.5 or later and FortiProxy 7.4 to 7.4.12 or later; FortiPAM 1.7 to 1.7.1 or later; and FortiSwitchManager 7.2 to 7.2.8 or later and 7.0 to 7.0.7 or later. Migrate other affected release branches to a corrected release using Fortinet's recommended upgrade paths. For Siemens RUGGEDCOM APE1808 deployments running FortiGate NGFW, version 7.4.10 is the minimum fix for this vulnerability. Patching does not remove existing implants or invalidate stolen credentials. If compromise is suspected, preserve volatile evidence before restarting or upgrading, investigate unauthorized administrative and auto-script changes, and rotate exposed passwords, keys, certificates, and management trust material.
No public exploits tracked yet. Mallory keeps watching.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
70 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.