FortiOS CLI path traversal CVE-2025-61624: exploited to gain root
An admin-level path traversal in FortiOS, FortiProxy, FortiPAM and FortiSwitchManager was exploited to gain root. Affected versions, fixes and detection.

CVE-2025-61624 is a path traversal in the command line of Fortinet FortiOS, FortiProxy, FortiPAM and FortiSwitchManager that lets an authenticated read-write administrator write or delete arbitrary files. Fortinet flagged it as exploited when it published FG-IR-26-122 on 14 April 2026, Unit 42 showed attackers using it to gain root on FortiGates, and CISA added it to KEV on 16 October 2026. Upgrade to FortiOS 7.6.5 or 7.4.10, or migrate off 7.2, 7.0 and 6.4.
The attack path
Four steps, from the way in to the fix.
CVE-2025-61624 needs an administrator login, which is why Fortinet rates it medium. Unit 42's account of a real intrusion shows what that leaves out. A FortiOS administrator, even a super_admin, works inside a restricted command line with no shell, while the daemons underneath run as root. This bug lets an administrator write files anywhere on the appliance, and attackers used it to turn admin access into root and load a memory-resident implant called PEERSTITCH.
Fortinet found the flaw internally and published advisory FG-IR-26-122 on 14 April 2026, already marked as known exploited but with no detail. The CVE number dates from September 2025, when Fortinet reserved it. On 14 October 2026 Unit 42 published its investigation of a telecom provider breach, and CISA added the CVE to its Known Exploited Vulnerabilities catalog two days later, giving federal agencies until 19 October and requiring forensic triage.
Who is affected
The flaw is in the command line interpreter of four Fortinet product lines:
| Product | Affected | Fixed |
|---|---|---|
| FortiOS 7.6 | 7.6.0 through 7.6.4 | 7.6.5 |
| FortiOS 7.4 | 7.4.0 through 7.4.9 | 7.4.10 |
| FortiOS 7.2, 7.0, 6.4 | All versions | No fix; migrate to a fixed branch |
| FortiProxy 7.6 | 7.6.0 through 7.6.4 | 7.6.5 |
| FortiProxy 7.4 | 7.4.0 through 7.4.11 | 7.4.12 |
| FortiProxy 7.2, 7.0 | All versions | No fix; migrate to a fixed branch |
| FortiPAM 1.8 | Not affected | — |
| FortiPAM 1.7 | 1.7.0 | 1.7.1 |
| FortiPAM 1.0 to 1.6 | All versions | No fix; migrate to a fixed branch |
| FortiSwitchManager 7.2 | 7.2.0 through 7.2.7 | 7.2.8 |
| FortiSwitchManager 7.0 | 7.0.0 through 7.0.6 | 7.0.7 |
Siemens lists its RUGGEDCOM APE1808, which runs FortiGate NGFW, as affected below NGFW 7.4.10. The solution text in Fortinet's CVE record also mentions FortiSASE, fixed by Fortinet in 25.4.b, and FortiSwitch, but neither appears in the advisory's affected table.
The attacker needs an authenticated account with an admin profile and at least read-write permission. Fortinet scores the attack vector as local; NVD scores it as network. Every read-write admin, admin-facing interface and stored copy of your configuration widens the exposure.
How the FortiOS CLI path traversal works
Fortinet describes a path traversal (CWE-22) in the command line interpreter: crafted arguments to existing commands let a privileged user write or delete arbitrary files. It does not name the command, and it lists the impact as privilege escalation.
Unit 42 supplied the detail. The flaw sits in the CLI's auto-script feature, which runs administrator-defined CLI scripts. FortiOS does not sanitize the script's object name, so a name containing ../ sequences places the script body anywhere on the file system, where it runs with the auto-script engine's privileges. Unit 42 describes the result as reading and writing arbitrary files as root, slightly broader than Fortinet's wording.
The restricted admin CLI is meant to be a boundary. A file write as root crosses it.
Is it being exploited?
Yes, and Fortinet said so from the start:
- Fortinet. The advisory has carried "Known Exploited: Yes" since publication, as an archived copy from 15 April shows. Fortinet has published no indicators or victim details.
- Unit 42. On 14 October 2026 it described an intrusion at a telecom managed service provider by a cluster it tracks as CL-STA-0954 (aka UNC5820). The attackers entered through a FortiManager flaw, CVE-2024-47575, in September 2024 and took the configurations of more than 500 managed firewalls, including passwords Unit 42 showed were recoverable. They later used CVE-2025-61624 to gain root on selected firewalls, deploy PEERSTITCH and plant a reverse shell through Apache's ACME module.
- CISA. KEV lists the bug from 16 October, due 19 October. CISA records active exploitation that is not automatable but has total technical impact, and its CVE record enrichment cites the Unit 42 report.
Unit 42 does not say when the CVE-2025-61624 step happened, so whether it predates Fortinet's April fix is not public. Nor has CISA explained why the listing came six months after Fortinet flagged exploitation.
Check your exposure
Confirm the version, look for auto-script objects you did not create, and see where admin access is offered:
get system status
show system auto-script
show system interface | grep allowaccess
diagnose debug crashlog readThen search logs kept off the device, since the attackers killed local logging first:
# Auto-script objects created with traversal sequences in their names
grep -rF 'auto-script' /path/to/fortigate-logs/ | grep -F '../'
# Infrastructure Unit 42 tied to the intrusion
grep -rE '23\.240\.77\.233|47\.18\.167\.159|45\.32\.41\.202|198\.199\.122\.22' /path/to/fortigate-logs/Fix it
Upgrade to the fixed release in the table, following Fortinet's upgrade path tool. On branches with no fix, plan a migration rather than waiting for a patch.
Fortinet lists no configuration workaround. Its only interim measure is a FortiGuard virtual patch, FG-VD-59270.0day, in FMWP database update 25.120, and the advisory does not say what it inspects. Until you upgrade, keep read-write admins few and offer admin access only on management networks.
Upgrading does not undo a compromise. PEERSTITCH runs in process memory, so collect volatile evidence with Fortinet support before rebooting a suspect device, then rotate admin and SSL VPN passwords and certificates held in the configuration.
Detect attempts and compromise
Unit 42 published these signals, plus file hashes and a YARA rule:
- Auto-script names. Objects named
../../../../setupor../../tmp/apache2/conf/md-acme.conf, or any configuration revision with../in asystem.auto-scriptobject. The attackers deleted them after use, so check revision history. - Staged files.
index.js,index.wasm,ipssem.jsandlldprxunder/data2/template/, plus a self-deletingpM.js. - Process memory. Anonymous 16 KB read-write-execute regions in
/bin/miglogdor/bin/iked. - Crashes and log gaps. Segmentation faults for
miglogd,ikedorsyslogd, cleared crash logs, killed logging daemons and drops on the tunnel management interface. - Infrastructure.
23.240.77[.]233and47.18.167[.]159, which hosted the installer, and45.32.41[.]202and198.199.122[.]22, used to register a rogue FortiGate with FortiManager.
If any of these fired, treat the device as compromised, and treat every firewall managed from the same platform as exposed.
Beyond this patch
A bug that requires admin rights is only as contained as the admin credentials. Configuration backups, management platforms and reversible password storage put those credentials one breach away, so guard them like the firewall itself. Keep logs off the device too, since root can silence local logging; Rokkhe's SOC pipeline shows how forwarded events become cases with the evidence kept.
Frequently asked questions
Am I affected if I run FortiOS 7.2, 7.0 or 6.4?
Yes. Fortinet lists every version of FortiOS 7.2, 7.0 and 6.4 as affected and publishes no fixed release for those branches. The remedy is to migrate to FortiOS 7.4.10, 7.6.5 or later, following Fortinet's upgrade path tool. The same applies to FortiProxy 7.2 and 7.0 and to FortiPAM 1.0 through 1.6. An attacker still needs a read-write administrator account, so limit those accounts until you have moved.
Is CVE-2025-61624 being exploited?
Yes. Fortinet's advisory has marked it as known exploited since publication on 14 April 2026. On 14 October 2026 Unit 42 described attackers using it to gain root on FortiGate firewalls at a telecom managed service provider and deploy the PEERSTITCH implant. CISA added it to its Known Exploited Vulnerabilities catalog on 16 October 2026 with a 19 October deadline. When the exploitation in Unit 42's case took place has not been published.
Is there a workaround if I cannot upgrade?
Fortinet lists no configuration workaround. Its only interim measure is a FortiGuard virtual patch named FG-VD-59270.0day, in FMWP database update 25.120, and the advisory does not describe what it covers. Because exploitation needs an authenticated read-write administrator, the practical stopgap is to narrow that path: remove unneeded admin accounts, offer admin access only on management networks and rotate admin passwords, especially if configuration files may have leaked.
How do I detect exploitation of CVE-2025-61624?
Look for auto-script objects whose names contain ../, such as ../../../../setup, in the configuration and its revision history. Unit 42 also lists files under /data2/template/ including lldprx and ipssem.js, anonymous 16 KB read-write-execute memory regions in miglogd or iked, segmentation faults in crash logs, killed logging daemons, and traffic to 23.240.77[.]233 or 47.18.167[.]159. Search logs stored off the device, because the attackers silenced local logging.
Why did a 2025 CVE enter the KEV catalog in October 2026?
Fortinet reserved the CVE number in September 2025 but published the advisory, FG-IR-26-122, on 14 April 2026, already marked as exploited. CISA added it to KEV on 16 October 2026, two days after Unit 42 published its PEERSTITCH investigation, and CISA's enrichment of the CVE record cites that report. CISA has not explained the six-month gap between Fortinet's exploitation flag and the KEV listing.
Sources
- FortiGuard PSIRT — FG-IR-26-122: Path Traversal in CLI (CVE-2025-61624)
- Fortinet — CSAF document for FG-IR-26-122
- Internet Archive — FG-IR-26-122 as captured on 15 April 2026
- CISA — Known Exploited Vulnerabilities catalog (JSON feed)
- CISA — Adds Two Known Exploited Vulnerabilities to Catalog (16 Oct 2026)
- CVE record — CVE-2025-61624 (Fortinet CNA and CISA ADP data)
- NVD API — CVE-2025-61624
- Unit 42 — Unit 42 Uncovers PEERSTITCH, a Stealthy FortiGate Implant
- Siemens ProductCERT — SSA-975644: Fortigate NGFW on RUGGEDCOM APE1808
Published 28 October 2026 · By the Rokkhe research team


