FortiWeb (API and CLI)
CVE-2025-58034: FortiWeb command injection, exploited and likely chained with an auth bypass
An OS command injection in FortiWeb's SAML configuration lets an authenticated admin run commands as root. Fortinet says it is exploited in the wild, CISA lists it in KEV, and attackers are reported to chain it with CVE-2025-64446.
Published Updated Fortinet advisory FG-IR-25-513
Affected and fixed versions
| Product / branch | Fixed in |
|---|---|
| FortiWeb 8.0.0 to 8.0.1 | 8.0.2 or later |
| FortiWeb 7.6.0 to 7.6.5 | 7.6.6 or later |
| FortiWeb 7.4.0 to 7.4.10 | 7.4.11 or later |
| FortiWeb 7.2.0 to 7.2.11 | 7.2.12 or later |
| FortiWeb 7.0.0 to 7.0.11 | 7.0.12 or later |
Always confirm against the vendor advisory, which lists every fixed hotfix.
What it is
FortiWeb passes the name of a SAML configuration to a shell command without cleaning it. Rapid7 found that the other SAML fields are filtered for characters such as backticks, $, ;, & and |, but the name is not. When a SAML configuration is created or deleted, the injected command runs as root on the appliance.
The attacker needs an administrator account with write access to the authusergrp area. That is why Fortinet rates it medium (CVSS 7.2). It is still dangerous: Fortinet says it has observed exploitation in the wild, and CISA added it to KEV on the day of the advisory.
The bigger risk is the chain. CVE-2025-64446 is a FortiWeb auth bypass that lets an unauthenticated attacker create a local admin. Orange Cyberdefense reported campaigns chaining the two, and Rapid7 believes together they give unauthenticated remote code execution. Fortinet has not confirmed the link, and Trend Micro, which reported this bug, calls them separate issues. Fortinet also fixed this one quietly in October 2025, weeks before the advisory.
Rapid7 notes the advisory says “multiple” command injections were fixed under this one CVE, which makes exact detection harder. The injection is limited to 63 characters and some characters are blocked, but Rapid7 still got a root reverse shell on 8.0.1.
Am I affected?
You are affected if you run FortiWeb older than 8.0.2, 7.6.6, 7.4.11, 7.2.12 or 7.0.12 on the matching branch. Not affected, per Fortinet: FortiWeb 6.4 and FortiAppSec Cloud.
Exploitation needs admin access. If CVE-2025-64446 is also unpatched, treat the management interface as the exposure: an unpatched device with its GUI reachable from the internet should be considered at risk.
The CVE record is inconsistent on versions. Its text lists 8.0.0 to 8.0.1, 7.6.0 to 7.6.5, 7.4.0 to 7.4.10, 7.2.0 to 7.2.11 and 7.0.0 to 7.0.11, while its structured ranges are narrower and omit 8.0.x. This page follows Fortinet’s advisory.
What to do
- Upgrade to 8.0.2, 7.6.6, 7.4.11, 7.2.12, 7.0.12 or later. Upgrading also covers CVE-2025-64446 on 8.0.2.
- There is no workaround for this CVE. Upgrading is the only fix. As a stopgap for the related CVE-2025-64446, Help Net Security reports that disabling HTTP/HTTPS on internet-facing interfaces helps. Check the production impact before doing that, because it removes GUI management.
- Restrict management access to trusted addresses or a VPN. This is general hardening, not a Fortinet-documented fix for this CVE.
- If the device was exposed and unpatched, assume it may be compromised. Review admin accounts and SAML settings, rebuild if you find anything unexpected, and rotate admin passwords and any secrets stored on the appliance. A root shell exposes everything FortiWeb holds, including certificates and keys for the sites it protects.
Detection
No indicators of compromise (IPs, hashes, file paths) have been published for this CVE. Look for behaviour instead:
- Admin accounts you did not create. The related CVE-2025-64446 chain is reported to create local admin accounts.
- SAML configurations with odd names, especially names containing backticks, shell syntax or a reverse shell command. Rapid7’s demonstration used a backtick-wrapped netcat command as the SAML user name.
- Creation or deletion of SAML configurations that nobody on your team made, in the audit and event logs.
- Outbound connections from the FortiWeb appliance to hosts it has no reason to contact.
- Unexpected configuration changes after any admin login you cannot account for.
Indicators of compromise
No indicators of compromise have been published for this CVE yet. We'll add them here if the vendor or a researcher releases any. Until then, use the behaviour in Detection.
Sources
Spotted a mistake on this page? Tell us, and we'll fix it.
Page changelog
- Full analysis published.
KEV status, EPSS score and vendor data refreshed automatically, last on 24 Nov 2026.