Skip to content
Path traversal Write-up Advanced

CVE-2026-104286: Fortinet Fortimail Vulnerability Exploited

A pre-authentication path traversal combined with NULL byte handling in FortiMail's IBE web interface allowed an unauthenticated attacker to write arbitrary files to the appliance. Attackers chained this file write into root code execution by dropping a malicious shared library and modifying the dynamic linker preload configuration.

Pranav Khune Follow

Published on blog.securelayer7.net

CVE Technical Deep-Dives

Pranav Khune, on blog.securelayer7.net

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the IBE web handler validated a path using C-style string functions that stop at a NULL byte, while the downstream file operation processed a different, traversal-containing path, creating a validation mismatch.

Impact

An unauthenticated remote attacker could achieve root-level code execution on the appliance, potentially exposing the entire email corpus, TLS private keys, and credentials, and providing a pivot into the internal network.

What the attacker needed

IBE web interface reachable from the internet; No authentication required; No user interaction required

The fix

Fortinet released fixes in FortiMail 8.0.2, 7.6.7, and 7.4.9 that reject NULL bytes and normalise paths, though the advisory does not confirm a centralised sanitiser across all endpoints.

How it was found

  1. Send an HTTP request to the /ibe endpoint containing directory traversal sequences and a NULL byte in the path.
  2. Write a malicious shared library to a filesystem location using the file-write primitive.
  3. Create or modify the dynamic linker preload file to load the dropped library.
  4. Replace system binaries and modify the web server configuration for persistence.
  5. Create an archive account configured to exfiltrate data to an external address.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

FortiMail is an email security appliance that also hosts a web portal for encrypted messages. A flaw in how that portal handled file paths let anyone on the internet trick it into writing files anywhere on the system, without logging in. Because the web service ran with high privileges, attackers could then make the appliance run their own code.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

More by Pranav Khune

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.