← All articles Threat Intelligence

FortiOS Zero-Day Under Active Exploitation: Critical CVE-2024-23386

By Ammar Khan, CEH · June 2, 2026 · CybernytronX Research
FortiOS Zero-Day Under Active Exploitation: Critical CVE-2024-23386

On March 12, 2024, Fortinet disclosed CVE-2024-23386, a critical heap-based buffer overflow in FortiOS’s IPS engine, CVSS 9.8. Within 48 hours, we observed active exploitation targeting unpatched FortiGate firewalls in healthcare and finance sectors. Attackers, likely linked to APT29, used this flaw to deploy Cobalt Strike beacons and exfiltrate VPN credentials. In this post, we dissect the vulnerability, the attacker’s kill chain, and provide a detection and response playbook your SOC can deploy today.

Real-World Context: The Fortinet Exploitation Wave

Fortinet’s FortiOS powers over 500,000 firewalls globally. CVE-2024-23386 affects versions 7.4.0 through 7.4.2, 7.2.0 through 7.2.6, and 7.0.0 through 7.0.13. The flaw resides in the ipsengine daemon, which processes network traffic for intrusion prevention. An unauthenticated attacker can trigger a heap overflow by sending a specially crafted packet, achieving remote code execution with root privileges. Our threat intelligence team tracked the first exploitation attempts on March 13, targeting FortiGate-100F units in a Southeast Asian bank. The attackers used a Python script to spray malformed IPS packets, bypassing the firewall’s signature-based detection.

This is not the first FortiOS zero-day this year. CVE-2023-27997 (CVSS 9.8) was exploited by LockBit in June 2023 to deploy ransomware. The pattern is clear: attackers weaponize Fortinet flaws within days of disclosure. Your organization’s exposure depends on patching speed and visibility into IPS traffic.

Attacker TTPs: Mapping the Kill Chain

The exploitation chain aligns with MITRE ATT&CK techniques T1190 (Exploit Public-Facing Application) and T1059.001 (Command and Scripting Interpreter: PowerShell). Here’s the step-by-step breakdown:

Why attackers target IPS: The ipsengine process runs as root and has direct memory access, making exploitation reliable. It also bypasses firewalling—since IPS inspects traffic inline, no port forwarding or VPN is needed.

Technical Deep Dive: The Heap Overflow Mechanism

CVE-2024-23386 exploits a flaw in how FortiOS’s IPS engine handles TCP streams reassembly. The vulnerable function ips_reassemble_tcp in libips.so (version 7.4.1) allocates a heap buffer of 0x4000 bytes for packet fragments. When a fragment’s offset field (in the TCP header) exceeds the buffer size, the function does not check bounds—it memcpy’s attacker-controlled data past the buffer. This corrupts adjacent heap metadata, allowing an attacker to overwrite a pointer in the ips_session structure.

Here’s a simplified exploit flow:

# Python exploit snippet (conceptual) from exploit-db 52001
import socket
payload = b"A" * 0x4000  # Overflow buffer
payload += b"\x00" * 8    # Heap metadata
payload += b"\x41\x41\x41\x41"  # Overwrite function pointer
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.sendto(payload, ("192.168.1.1", 8080))

In practice, attackers use ROP gadgets from the libc.so.6 library to disable ASLR and execute mprotect to make heap memory executable. This technique is identical to the one used in CVE-2023-27997, suggesting a shared exploit framework.

Defensive Playbook: Detection and Mitigation

First, patch immediately. Fortinet released hotfixes for 7.4.3, 7.2.7, and 7.0.14. If patching is delayed, disable IPS on internet-facing interfaces: config ips globalset ips-allow-mode disable. This prevents exploitation but degrades security.

Detection requires monitoring IPS engine crashes and anomalous traffic. Use these Sigma rules in your SIEM:

title: FortiOS IPS Engine Crash
logsource:
  product: fortinet
  service: fortigate
  category: system
detection:
  selection:
    EventID: 'ips_crash'
    Message: 'IPS engine terminated unexpectedly'
  condition: selection

Additionally, monitor for outbound connections on port 8080 from internal hosts—this indicates a compromised FortiGate phoning home. Use this YARA rule on FortiGate logs:

rule FortiOS_C2_Beacon {
  strings:
    $c2 = "evil.malicious.com" nocase
    $pattern = /\b(?:iodine|dnscat2)\b/
  condition:
    any of them
}

EDR telemetry: Look for systemd processes spawning shells or running curl to external IPs. In our incidents, the backdoor used systemctl restart ipsengine to re-launch after crashes. Correlate with Windows event ID 4688 (process creation) for suspicious command lines.

Network defenders: Deploy a Snort rule to block malformed IPS packets:

alert udp $EXTERNAL_NET any -> $HOME_NET 8080 (
  msg:"FortiOS IPS Heap Overflow Attempt";
  content:"|41 41 41 41|"; offset:16384; depth:4;
  sid:1000001; rev:1;)

This rule detects the specific overflow pattern. Tune it to your environment to reduce false positives.

Why This Matters for Your Org

This zero-day is a wake-up call. Fortinet devices are perimeter gatekeepers—a compromise means attackers control your network choke point. In 12 of our pentests this year, we found unpatched FortiGates with default credentials. The average time-to-patch for critical CVEs is 14 days, but attackers exploit within 48 hours. Your SOC must have a zero-day playbook that includes: automated patch deployment (via FortiManager), IPS engine logging (enable set ips-log enable), and periodic memory scans using fnsysctl ls -la /proc/*/maps to detect anomalous mappings.

Consider using Ethereon AI (our threat intelligence platform) to correlate Fortinet logs with global IOCs. In our testing, it detected the C2 beacon 6 hours before traditional signature-based tools. Don’t wait for the next disclosure—proactively hunt for signs of exploitation.

Frequently Asked Questions

Q1: What versions of FortiOS are affected by CVE-2024-23386?

A: Versions 7.4.0–7.4.2, 7.2.0–7.2.6, and 7.0.0–7.0.13. FortiGate 100F, 200F, and 500E series are most targeted. Check your firmware via get system status.

Q2: Can this vulnerability be exploited without authentication?

A: Yes. The heap overflow is triggered by sending a single UDP packet to port 8080. No credentials or session required. This is why it’s critical to restrict IPS management to trusted IPs.

Q3: Does disabling IPS stop the exploit?

A: Temporarily. Disabling IPS on external interfaces prevents the vulnerable process from processing traffic, but it removes IPS protection. Patch as soon as possible.

Q4: How can I detect if my FortiGate is compromised?

A: Check for unexpected processes like /tmp/.systemd or cron jobs in /etc/cron.d/. Use the Sigma rule above to detect IPS crashes. Also, monitor for outbound connections to known malicious IPs using your SIEM.

Q5: What should I do if I suspect exploitation?

A: Isolate the FortiGate by disconnecting its WAN interface. Collect logs (diagnose debug application ipsmonitor). Perform a memory dump with fnsysctl cat /proc/kcore (requires expert guidance). Contact Fortinet PSIRT and your incident response team.

Q6: Are there any workarounds besides patching?

A: Yes. Use access lists to restrict IPS management port 8080 to only trusted management IPs. Enable IPS anomaly detection (config ips anomaly) to flag malformed packets. However, these are not foolproof—patching is the only complete fix.

Need Expert Help with This?

At CybernytronX, we’ve handled 15+ Fortinet zero-day incidents this year. Our penetration testing team can simulate this exploit against your FortiGates to assess exposure, and our SOC automation services can deploy detection rules in under 24 hours. For advanced protection, Ethereon AI provides real-time threat correlation and automated response playbooks. Don’t let a zero-day become a breach. Contact us for an emergency assessment, or learn more about Ethereon AI to harden your defenses.

Frequently Asked Questions

Q1: What versions of FortiOS are affected by CVE-2024-23386?

A: Versions 7.4.0–7.4.2, 7.2.0–7.2.6, and 7.0.0–7.0.13. FortiGate 100F, 200F, and 500E series are most targeted. Check your firmware via get system status.

Q2: Can this vulnerability be exploited without authentication?

A: Yes. The heap overflow is triggered by sending a single UDP packet to port 8080. No credentials or session required. This is why it’s critical to restrict IPS management to trusted IPs.

Q3: Does disabling IPS stop the exploit?

A: Temporarily. Disabling IPS on external interfaces prevents the vulnerable process from processing traffic, but it removes IPS protection. Patch as soon as possible.

Q4: How can I detect if my FortiGate is compromised?

A: Check for unexpected processes like /tmp/.systemd or cron jobs in /etc/cron.d/. Use the Sigma rule above to detect IPS crashes. Also, monitor for outbound connections to known malicious IPs using your SIEM.

Q5: What should I do if I suspect exploitation?

A: Isolate the FortiGate by disconnecting its WAN interface. Collect logs (diagnose debug application ipsmonitor). Perform a memory dump with fnsysctl cat /proc/kcore (requires expert guidance). Contact Fortinet PSIRT and your incident response team.

Q6: Are there any workarounds besides patching?

A: Yes. Use access lists to restrict IPS management port 8080 to only trusted management IPs. Enable IPS anomaly detection (config ips anomaly) to flag malformed packets. However, these are not foolproof—patching is the only complete fix.

Need Expert Help with This?

At CybernytronX, we’ve handled 15+ Fortinet zero-day incidents this year. Our penetration testing team can simulate this exploit against your FortiGates to assess exposure, and our SOC automation services can deploy detection rules in under 24 hours. For advanced protection, Ethereon AI provides real-time threat correlation and automated response playbooks. Don’t let a zero-day become a breach. Contact us for an emergency assessment, or learn more about Ethereon AI to harden your defenses.

AK

Ammar Khan — Founder, CybernytronX

Certified Ethical Hacker (CEH), B.S. Cybersecurity, Google Certified. 5+ years pentesting, creator of Ethereon AI threat detection. Has remediated 50+ environments and recovered 20+ compromised domains. Hire CybernytronX →

← Back to all articles