PEERSTITCH Malware Uses FortiOS Flaw to Alter Tagged VPN Sessions

· Original article ↗

Summary

Unit 42 reports that attackers exploited FortiOS CVE-2025-61624 to deploy PEERSTITCH, a memory-resident implant that injects code into FortiOS daemons and alters handling of tagged VPN sessions.

Key points

  • Unit 42 attributed the activity to CL-STA-0954, also known as UNC5820, and linked it to an intrusion involving a telecommunications managed service provider.
  • The attackers reportedly used CVE-2025-61624, a FortiOS command-line path traversal flaw, to deploy PEERSTITCH; Fortinet patched the flaw in April 2026.
  • PEERSTITCH is a memory-resident ARM64 Linux executable that does not leave a persistent binary on disk or initiate its own outbound network connections.
  • An injector patches the memory of FortiOS daemons miglogd and iked, creating a covert communication bridge between the processes.
  • The hooks pass a session identifier between the daemons and can redirect handling of matching VPN sessions around default FortiOS security validations.
  • Researchers also observed a separate SSH reverse-shell channel using Apache mod_md, and reported that attackers disrupted logging and removed forensic artifacts.

Article Details

Attack Vectors
  • The attackers exploited CVE-2025-61624, a FortiOS command-line interpreter path traversal flaw, to write or delete files and deploy PEERSTITCH.
  • The intrusion initially compromised FortiManager by exploiting CVE-2024-47575 (FortiJump), then used stolen firewall configurations and credentials or other harvested information for reconnaissance and access to downstream networks.
  • PEERSTITCH's components were configured to download from an external server. Its injector used ptrace to patch the memory of the FortiOS processes miglogd and iked, creating a covert communication bridge and altering handling of tagged VPN sessions.
  • The attackers established a separate command-and-control channel by using Apache mod_md on FortiGate firewalls to spawn an SSH-based reverse shell.
  • The attackers impersonated FortiManager to pull information from managed firewalls. Unit 42 said exploitation of CVE-2024-26009 and CVE-2024-26008 was suspected but not definitive; it also noted that exploiting those flaws requires FortiGate Cloud/FortiCloud SSO enrollment, which the affected firewalls did not have.
Defensive Notes
  • Fortinet patched CVE-2025-61624 in April 2026; apply the relevant vendor security updates to affected products.
  • Monitor FortiOS appliances and processes for unexpected memory manipulation or ptrace activity involving miglogd and iked, unusual tagged VPN sessions, and unauthorized changes to VPN-session handling.
  • Investigate unexpected SSH-based reverse shells, unauthorized FortiGate SSL/VPN sessions, and suspicious use of Apache mod_md on FortiGate firewalls.
  • Check for interference with syslog generation or logging telemetry, cleared crash logs, and unexpected deletion of administrator accounts or auto-script objects.

Indicators of compromise

TypeIndicatorContext
IPV423[.]240[.]77[.]233External server identified as the source from which PEERSTITCH's auto-script downloads five components.

MITRE ATT&CK

CVE

People

Threat Actors

Malware

Vendors

Products

Industries

Related Articles