DEV Community

Cover image for CVE-2026-104286: Fortinet FortiMail Path Traversal Vulnerability — Analysis & Mitigation
Faizan Akhtar
Faizan Akhtar

Posted on Originally published at faizanakhtarcyber.blogspot.com

CVE-2026-104286: Fortinet FortiMail Path Traversal Vulnerability — Analysis & Mitigation

On October 1, 2026, Fortinet published advisory FG-IR-26-175 for a vulnerability already being exploited against real customer appliances: CVE-2026-104286, a path traversal flaw in FortiMail that lets an unauthenticated attacker write arbitrary files to the appliance's underlying system through crafted HTTP or HTTPS requests. Rated CVSS 9.8 and listed in CISA's Known Exploited Vulnerabilities catalog the same day, this is a zero-day in the truest sense — Fortinet's own Product Security team discovered it while investigating attacks already in progress. FortiMail sits in front of your organization's email flow, which makes this one of the worst places a file-write primitive can land. Here is my full analysis of the bug, the attack chain, and exactly what to do about it.

Summary

CVE-2026-104286 combines two weaknesses working together: improper limitation of a pathname to a restricted directory (CWE-22, classic path traversal) and improper neutralization of a NULL byte or NULL character (CWE-158). Chained together, they let a crafted web request escape the directory the web server intends to confine files to, and plant a file anywhere the service account can write. No credentials, no session, no user interaction — the request arrives over ordinary HTTPS and the file lands.

  • CVE ID: CVE-2026-104286 (Fortinet advisory FG-IR-26-175)
  • Product: Fortinet FortiMail (physical, virtual, and cloud appliances)
  • Severity: CVSS 3.1 9.8 — Critical
  • Disclosed: October 1, 2026 (Fortinet advisory; NVD published the same day)
  • Exploitation: Actively exploited in the wild as a zero-day; added to the CISA KEV catalog on October 1, 2026 (federal remediation deadline: October 4, 2026)
  • Workaround: Yes — disable the Identity-Based Encryption (IBE) feature, or block internet access to the management interface

The flaw lives in the FortiMail management interface. Attackers are exploiting it to turn a file-write into a persistent foothold: observed intrusions use the write to install a dynamic-linker implant and backdoor services, then beacon out. Fortinet credited the internal discovery to Gwendal Guégniaud of its Product Security team — this bug surfaced from forensic artifacts on systems already under attack, not from a lab audit.

Severity

CVE-2026-104286 is rated CVSS 3.1 9.8 (Critical) with the vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, scored by Fortinet's own PSIRT. In plain language:

  • Attack Vector: Network (AV:N) — the attack arrives as ordinary HTTP/HTTPS requests. Any internet-reachable FortiMail appliance is in scope.
  • Attack Complexity: Low (AC:L) — no special conditions to arrange; the crafted request works reliably.
  • Privileges Required: None (PR:N) — zero credentials. The attacker is a complete stranger to the appliance.
  • User Interaction: None (UI:N) — nobody has to click, open, or approve anything. Fully scriptable.
  • Scope: Unchanged (S:U) — the impact stays within the appliance, but on an appliance like this, "within" is still catastrophic.
  • Confidentiality / Integrity / Availability: High — arbitrary file write on a Linux-based appliance is the primitive attackers build total compromise out of.

The exploit prediction data backs the severity: a 2.20% estimated 30-day exploitation probability (82nd percentile among all CVEs) is unusually high, and NVD's SSVC decision marks exploitation as active and automatable — the flag that should worry defenders most, because it means a scanner can fire this at thousands of appliances at once.

Affected Versions

The vulnerability affects FortiMail across all four supported release branches, on physical, virtual, and cloud appliances in all configurations where the IBE request handler is reachable:

  • FortiMail 8.0.0 through 8.0.1 — affected
  • FortiMail 7.6.0 through 7.6.6 — affected
  • FortiMail 7.4.0 through 7.4.8 — affected
  • FortiMail 7.2.0 through 7.2.9 — affected

Fixed in: 8.0.2, 7.6.7, and 7.4.9 (published after the advisory — at disclosure time only the workaround was available). There is no fixed build in the 7.2 branch: if you are on 7.2.x, Fortinet's guidance is to migrate to 7.4.9 or later, not wait for a backport that is not coming.

Technical Analysis

To understand why this 9.8 is genuinely dangerous rather than just theoretically scary, you need to think about what "arbitrary file write" means on an appliance — and how two modest weaknesses combine into something much worse than either alone.

Start with the chain. CWE-22 (path traversal) is the classic ../ escape: a filename parameter that the application joins to a base directory without proper normalization. By itself, modern filters usually catch the obvious forms. But here the traversal is paired with CWE-158 (NULL byte neutralization): many web-facing daemons are written in C or call into C libraries, where a %00 byte truncates a string. If the application validates the path before the null byte is processed but the filesystem resolves it after, the validation and the reality disagree — the check sees a safe path while the operating system writes somewhere else entirely. It is an old trick, and it is still devastating because it defeats exactly the kind of blacklist filter ("block ../ sequences") that this code appears to rely on.

Now consider where the write lands. FortiMail is not a generic web server — it is a hardened appliance whose whole purpose is to sit in the email flow, which means it is almost always reachable from the internet (it has to receive mail from the outside world) and it runs as a privileged service. An unauthenticated file write on such a box is not a "write some junk to /tmp" situation. The observed attack pattern makes this concrete: attackers plant a dynamic-linker implant — a malicious shared library that gets loaded into every process that starts — plus backdoored services, and then beacon out. That is not opportunistic defacement; that is a deliberate, professional foothold designed to survive reboots and blend into normal appliance behavior.

Attack scenario

Walk through it from the attacker's side. You scan for internet-facing FortiMail management interfaces and send a crafted HTTPS request to the IBE request handler with a filename parameter containing encoded traversal sequences and a null byte. The filter waves it through, and your payload lands outside the intended staging directory. In the observed intrusions, the next step is dropping a loader or implant into a location the appliance trusts, then establishing persistence through the appliance's own service machinery.

The persistence angle is the nightmare detail. Administrators upgrade firmware and assume the box is clean — but upgrades do not necessarily remove files an attacker planted in writable partitions, and a dynamic-linker implant re-infects every process it touches. This is why CISA's KEV entry carries forensic triage requirements under BOD 26-04: the mandated response is not just "patch," it is "patch and check whether someone was already inside."

Why the email gateway makes it worse

Position matters in security, and FortiMail's position is about as bad as it gets. It processes every email entering and leaving the organization, it typically holds TLS keys for mail inspection, it stores quarantine data, and it often integrates with directory services. A compromised email gateway is a platform for reading mail, injecting mail, and pivoting into the internal network through a device every firewall rule already trusts.

There is a second, subtler lesson here. The vulnerable component is the management interface, and the workaround is to disable IBE or cut it off from the internet — which raises the question every FortiMail administrator should be asking: why was the management interface reachable from the internet at all? Patch this CVE, but also fix the architecture that let it be reachable.

Mitigation

Fortinet's response has two phases — the workaround you apply today, and the upgrade you schedule immediately:

  1. Apply the IBE workaround now. Until the fixed builds are installed, disable Identity-Based Encryption from the CLI:
   config system encryption ibe
     set status disable
   end
Enter fullscreen mode Exit fullscreen mode

This removes the vulnerable request handler from the attack surface. IBE is a niche feature — most deployments will not miss it — so this is close to a free mitigation.

  1. Upgrade to the fixed releases. Move to 8.0.2, 7.6.7, or 7.4.9 depending on your branch. If you are on the 7.2 branch, there is no fixed build coming — plan the migration to 7.4.9 or later instead of waiting.
  2. Cut internet exposure of the management interface. Restrict the FortiMail management GUI and webmail to trusted private networks. If a WAF sits in front of the appliance, block POST requests to /ibe that contain ../ sequences as a compensating control.
  3. Assume compromise and hunt — do not just patch. Fortinet published indicators from real intrusions: look for a cron entry referencing /migadmin, an archive account with a remote destination, and IBE decryption errors or failed internal user logins in the encryption logs. If the appliance was internet-reachable while vulnerable, run the forensic triage CISA's BOD 26-04 requires before you declare the incident over.
  4. Watch for reinfection after upgrade. Because the observed implants are designed for persistence, verify post-upgrade that no unexpected shared libraries, cron entries, or modified services remain. A "clean" firmware version on a box with a planted loader is not a clean box.

References

Report by Faizan Akhtar — The Cyber Security Researcher

Top comments (1)

Collapse
 
suppdevbot profile image
DEV SUPPORTS •

Official Platform Update

Security protocols have been updated for all developer accounts.

  • tr.ee/dev-to