Automated Threat Modeling

Quick Look: FortiMail CVE-2026-126163, an SMTP Format String Flaw Allowing Unauthenticated Code Execution

A brief summary of CVE-2026-126163, a CWE-134 format string vulnerability in FortiMail 8.0.0 through 8.0.1 reachable through a crafted SMTP command, with patch information for the fixed 8.0.2 release.

CVE Analysis

8 min read

Gaurav Sarraf
Gaurav Sarraf

2026-11-11

Quick Look: FortiMail CVE-2026-126163, an SMTP Format String Flaw Allowing Unauthenticated Code Execution

Introduction

A remote attacker with no credentials may be able to execute unauthorized code or commands on a FortiMail 8.0 system by sending a single specially crafted SMTP command. FortiMail is an email security gateway that handles inbound, outbound, and internal mail, so the affected interface is the SMTP service at the center of what the product does rather than an optional management feature.

FortiMail is Fortinet's email security product, available as a hardware appliance, a virtual machine, a hosted service, and SaaS (FortiMail Cloud), and recently extended through FortiMail Workspace Security to cover browsers and collaboration tools. Fortinet states it was named a Challenger in the 2025 Gartner Magic Quadrant for Email Security (report dated December 1, 2025), although a 2021 Frost Radar report described FortiMail as a relatively small portion of Fortinet's overall business. It sits inside Fortinet's broader integrated security portfolio, which is why FortiMail advisories tend to be read alongside the company's FortiGate and FortiManager disclosures.

CVE-2026-126163 is a format string vulnerability (CWE-134) affecting FortiMail 8.0.0 through 8.0.1, rated 8.1 High by Fortinet as CNA. Fortinet published advisory FG-IR-26-215 on November 10, 2026, and NVD published its entry on November 11, 2026. The fix is FortiMail 8.0.2.

Technical information

Root cause: externally controlled format string

Fortinet and NVD classify the bug as CWE-134, Use of Externally Controlled Format String. The disclosed entry point is a specially crafted SMTP command, and no authentication is required. Fortinet has not disclosed the SMTP verb involved, the vulnerable function, the source file, or the command contents. Because Fortinet's own Product Security team found the issue internally, there is no third-party write-up or patch diff to compare against.

MITRE describes CWE-134 as a function accepting a format string that originates from an external source. In practice, attacker-controlled text ends up as the format argument of a printf-style function, for example a logging routine, snprintf, or a syslog wrapper, rather than as a data argument. Once that happens:

  • Directives such as %x and %s cause the function to read values the caller never supplied, leaking stack and memory contents.
  • The %n directive writes the number of bytes output so far to an address taken from the argument list, which turns the bug into a memory write primitive.
  • A carefully constructed string can give the attacker control over both what is written and where, which is the route from this bug class to arbitrary code execution.

These are properties of the weakness class. Fortinet has not published FortiMail's vulnerable code, so the exact sink and memory layout remain unknown.

The version matrix shows that only the 8.0 train is affected, while 7.4 and 7.6 are not. That suggests the flaw arrived with new or reworked SMTP handling code introduced in 8.0.0.

Attack flow as disclosed

Based on the advisory and the bug class, the sequence looks like this:

  1. The attacker connects to the SMTP service of a FortiMail system running 8.0.0 or 8.0.1. No account or prior session is required.
  2. The attacker sends a specially crafted SMTP command (the specific command is not disclosed).
  3. Attacker-controlled content from that command reaches a format string in the affected code path.
  4. Format directives embedded in the input cause memory reads and, potentially, memory writes inside the SMTP handling process.
  5. Unauthorized code or command execution may result.

The public record does not establish the execution privilege, the reliability of exploitation, or any particular memory layout requirement. Describing the outcome as guaranteed root access would go beyond what Fortinet has disclosed.

CVSS breakdown

NVD reports the Fortinet CNA base vector and has not yet published its own NIST assessment:

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
  • AV:N: reachable over the network.
  • AC:H: high attack complexity. By Fortinet's own rating, exploitation is not trivial, which is consistent with format string exploitation typically depending on target-specific conditions.
  • PR:N / UI:N: no privileges and no user interaction required.
  • S:U: scope unchanged.
  • C:H / I:H / A:H: high potential impact to confidentiality, integrity, and availability. These describe assessed potential, not observed data theft or disruption.

Fortinet's advisory also publishes an extended vector with temporal metrics:

AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P/RL:O/RC:C

RL:O (official fix) and RC:C (confirmed) are expected. The notable value is E:P. FIRST's CVSS 3.1 specification defines this as proof-of-concept exploit code being available, or an attack demonstration that is not practical for most systems and may require substantial modification by a skilled attacker. That indicates Fortinet assessed the issue as more than theoretical, but the advisory publishes no exploit, payload, or reproduction steps.

A metadata inconsistency

The advisory labels the affected component as "API", while the vulnerability description explicitly names SMTP. Fortinet does not explain the difference. Our reading is that the stated SMTP command route is the defensible attack description. Nothing in the advisory supports treating this as a REST or web API exploit.

Exploitation status

Fortinet marks CVE-2026-126163 as "Known Exploited: No", and the acknowledgement credits internal discovery by Gwendal Guegniaud of Fortinet's Product Security team, using the frontier AI model Claude Mythos. No threat actor, ransomware operation, or campaign has been attributed to this CVE in the sources we reviewed, and we found no CVE-specific indicators of compromise or detection rules. E:P and "Known Exploited: No" are not contradictory: one describes exploit maturity, the other describes observed attacks.

The CISA KEV catalog copy available to us is dated November 10, 2026, one day before NVD publication, so we are not asserting the CVE's current KEV status either way.

Patch information

Fortinet fixed CVE-2026-126163 in FortiMail 8.0.2. The fix ships as a firmware upgrade, so no source-level diff is public. The details below come from advisory FG-IR-26-215 and the FortiMail 8.0.2 release notes.

Fixed builds

  • FortiMail 8.0: 8.0.0 through 8.0.1 are vulnerable, fixed in 8.0.2 or above. The fixed release is FortiMail 8.0.2, build 263.
  • FortiMail 7.6: not affected. No action needed for this CVE.
  • FortiMail 7.4: not affected. No action needed for this CVE.

After upgrading, confirm the running build. Fortinet's upgrade guidance tells administrators to verify that "the build number and version number match the image loaded."

FortiMail Cloud was fixed before disclosure

Fortinet says it remediated FortiMail Cloud on October 5, 2026 by moving all tenants to v7.6.7 GA or v8.0.2 GA, and that "FortiMail Cloud customers need not perform any action." Two things follow:

  • The fixed 8.0.2 image existed about five weeks before the advisory went public. The hosted fleet was patched first and details were released afterward, which is a common pattern.
  • Self-managed appliance and virtual machine customers were not covered by that rollout and must install 8.0.2 themselves. A FortiMail virtual machine that happens to run in a remote data center is not the same thing as FortiMail Cloud.

What the fix most likely changes

Fortinet has not published which function or code path it changed. The usual remediation for CWE-134 is to move untrusted data out of the format slot and into the argument slot, for example:

log("%s", user_input) /* untrusted data passed as an argument */ log(user_input) /* untrusted data used as the format string */

The first form is the safe pattern and the second is the vulnerable one. Vendors also commonly enable compiler format security warnings, and MITRE recommends static format strings, the correct number of arguments, and high compiler and linker warning levels. These are general measures for developers working on the bug class. FortiMail administrators cannot apply them to closed product code.

Gaps in Fortinet's documentation

  • The "Common Vulnerabilities and Exposures" table on the 8.0.2 Resolved issues page lists CWE-22, CWE-89, CWE-321, CWE-522, and CWE-1050 entries, but not CWE-134. Fortinet notes that the table does not include every fixed bug, so the release notes cannot confirm this fix. The advisory is the authoritative source that 8.0.2 resolves it.
  • The advisory lists "Virtual Patch: No", meaning there is no FortiGuard IPS signature. Fortinet publishes no CVE-specific workaround, so the firmware upgrade is the only vendor-supported remedy. We are not aware of any validated SMTP filtering rule or firewall configuration that substitutes for it.

Upgrade path and precautions

The 8.0.2 release notes list the supported path ending in:

... > 7.6.5 (build 832) > 8.0.2 (build 263)

Fortinet states that downgrades lose configuration and are not generally supported. The release notes also call for the following:

  1. Before upgrading, back up the configuration and any other stored data.
  2. After upgrading, clear the browser cache before logging in to the web interface, and verify that the displayed build and version match the loaded image.
  3. Run an immediate antivirus signature update, since the signatures bundled with the firmware image may be older than those available from Fortinet. This is upgrade housekeeping, not part of the CVE fix.

Affected systems and versions

  • Affected: FortiMail 8.0.0 through 8.0.1 (self-managed appliances and virtual machines).
  • Fixed: FortiMail 8.0.2 (build 263) and above.
  • Not affected: FortiMail 7.6 and 7.4 branches.
  • FortiMail Cloud: remediated by Fortinet on October 5, 2026 (tenants moved to v7.6.7 GA or v8.0.2 GA). No customer action is required for this CVE.

The vulnerable configuration is any affected 8.0 system whose SMTP service is reachable by an attacker. The "not affected" status of 7.4 and 7.6 applies to this CVE only. Affected version ranges from other FortiMail advisories should not be carried over.

Vendor security history

The most relevant comparison is another FortiMail issue fixed in the same release. CVE-2026-104286 (advisory FG-IR-26-175, initially published October 1, 2026) describes unauthenticated arbitrary file writing through crafted HTTP or HTTPS requests, is rated 9.8 Critical, and is explicitly marked "Known Exploited: Yes". Its 8.0 branch remedy is also 8.0.2 or above.

The two issues share affected firmware and a fixed release but differ in attack interface (HTTP or HTTPS versus SMTP) and exploitation history. The exploited status of CVE-2026-104286 does not transfer to CVE-2026-126163, though for 8.0 customers the same upgrade addresses both.

Beyond FortiMail, CISA has reported confirmed active exploitation of FortiManager and published updated Fortinet guidance and indicators of compromise for that case, and later relayed a Fortinet advisory on a post-exploitation technique affecting known vulnerabilities. Fortinet's PSIRT policy provides for accelerated advisories when it observes active exploitation that increases customer risk. There is no indication that process was invoked for this CVE.

On the positive side, this particular flaw was found internally by Fortinet's Product Security team and the hosted service was fixed before disclosure. That documents one internal finding, not the overall effectiveness of Fortinet's testing program.

References

Detect & fix
what others miss

Works with
  • GitHub
  • GitLab
  • Bitbucket
  • Azure DevOps Services
  • Gerrit
  • CVS
  • Jira
  • Linear
  • Slack
  • Security Compass
Explore integrations
Security magnifying glass visualization