Critical FortiMail Flaw Lets Unauthenticated Attackers Write Arbitrary Files and Execute Code

Fortinet has disclosed a critical vulnerability in FortiMail that attackers are actively exploiting in the wild, allowing unauthenticated remote attackers to write arbitrary files to vulnerable appliances through specially crafted HTTP or HTTPS requests.

The flaw, tracked as CVE-2026-104286, combines path traversal and NULL-byte handling weaknesses and has received a CVSS score of 9.8.

Fortinet published advisory FG-IR-26-175 on October 1, warning organizations to implement the available workaround while awaiting fixed releases for several affected FortiMail branches.

Critical FortiMail Flaw

The issue affects FortiMail’s management interface and poses a serious risk to internet-exposed email-security appliances.

The vulnerability stems from an Improper Limitation of a Pathname to a Restricted Directory, classified as CWE-22, alongside Improper Neutralization of NULL Byte or NULL Character, tracked as CWE-158.

In practice, an attacker can potentially manipulate a file path in a crafted request so that the target file is written outside the intended restricted directory. NULL-byte handling failures can help bypass validation checks that otherwise restrict dangerous filenames or extensions.

Because exploitation does not require valid FortiMail credentials, exposed management interfaces are particularly vulnerable.

Although Fortinet’s advisory describes the direct impact as arbitrary file write, this capability can enable persistent compromise and may be leveraged to modify service configuration, place malicious binaries, hijack application libraries, or establish remote command execution depending on the files and paths an attacker can control.

Affected versions include FortiMail 8.0.0 through 8.0.1, FortiMail 7.6.0 through 7.6.6, FortiMail 7.4.0 through 7.4.8, and FortiMail 7.2.0 through 7.2.9.

Fortinet has said customers on the 8.0, 7.6, and 7.4 branches should upgrade to the upcoming 8.0.2, 7.6.7, and 7.4.9 releases, respectively. Organizations using FortiMail 7.2 should upgrade to FortiMail 7.4 or a later supported branch.

Until patches are available, Fortinet recommends disabling Identity-Based Encryption support with the following command:

config system encryption ibe
set status disable
end

Administrators can also reduce exposure by disabling internet access to the FortiMail management interface or restricting it to trusted private-network sources only. These measures are especially important where a device cannot be upgraded immediately.

Fortinet provided indicators associated with observed compromise activity, including newly added /data/lib/liblog.so, /data/bin/webconsole, /data/bin/mailservice, and /data/etc/ld.so.preload files. Modified files include /bin/smit, /data/etc/httpd.conf, and /data/migadmin.tar.gz.

The presence of ld.so.preload is particularly concerning because it can be used to load an attacker-controlled shared library into processes on the system.

Security teams should review FortiMail systems for the supplied hashes, unexpected modifications in /data and /bin, suspicious cron activity referencing /migadmin, and configuration changes that create remote archive accounts. Fortinet’s listed suspicious IP addresses are 79[.]141.169.187 and 45[.]129.0.192.

Given confirmed exploitation, organizations should treat all exposed and unpatched FortiMail appliances as high-priority incident-response targets, apply mitigations immediately, and conduct forensic review for persistence mechanisms and unauthorized configuration changes.

Join 16,000+ SOC teams using ANY.RUN to streamline threat investigations and reduce manual effort. Explore for your team 

Tamilselvan
Tamilselvanhttps://cyberpress.org/
Tamilselvan is an Investigative cybersecurity journalist dedicated to breaking stories on ransomware cartels, data breaches, and state-sponsored espionage.

Trending News

Related Stories