FortiWeb GUI (Fabric Connector)
CVE-2025-25257: FortiWeb pre-auth SQL injection to root code execution, exploited
An unauthenticated SQL injection in the FortiWeb GUI lets an attacker run code as root. Public exploits appeared on July 11, 2025, exploitation followed within days, and CISA added it to the KEV catalog.
Published Updated Fortinet advisory FG-IR-25-151
Affected and fixed versions
| Product / branch | Fixed in |
|---|---|
| FortiWeb 7.6.0 to 7.6.3 | 7.6.4 or later |
| FortiWeb 7.4.0 to 7.4.7 | 7.4.8 or later |
| FortiWeb 7.2.0 to 7.2.10 | 7.2.11 or later |
| FortiWeb 7.0.0 to 7.0.10 | 7.0.11 or later |
| FortiWeb 6.4 | Not affected |
Always confirm against the vendor advisory, which lists every fixed hotfix.
What it is
FortiWeb is Fortinet’s web application firewall. Its GUI has a SQL injection in the Fabric Connector code path that needs no login. An attacker sends crafted HTTP or HTTPS requests and runs SQL, and from there code, on the appliance. Help Net Security reports that this can reach root.
watchTowr traced the cause: the Authorization: Bearer token is placed into a SQL query without escaping. The requests reach it through /api/fabric/device/status and two /api/v[0-9]/fabric/widget endpoints. Per BleepingComputer, attackers abuse the injection to write a .pth file into Python’s site-packages, then call the CGI script /cgi-bin/ml-draw.py to run it.
Fortinet fixed it on July 8, 2025. Three days later watchTowr and a second researcher published public exploits. The Shadowserver Foundation saw attempts from July 11 and counted 85 infected devices on July 14, mostly with web shells. Fortinet confirmed exploitation on July 18, and CISA added the CVE to KEV the same day.
Am I affected?
You’re affected if you run FortiWeb 7.6.0 to 7.6.3, 7.4.0 to 7.4.7, 7.2.0 to 7.2.10 or 7.0.0 to 7.0.10. FortiWeb 6.4 is not affected.
The bug is in the GUI, so the risk is highest when the HTTP/HTTPS management interface is reachable from untrusted networks. Shadowserver still saw 223 exposed FortiWeb management interfaces after the first wave. Check your firmware version on the appliance, and check which networks can reach its management interface.
What to do
- Upgrade to 7.6.4, 7.4.8, 7.2.11, 7.0.11 or later.
- If you can’t patch tonight, disable the HTTP/HTTPS administrative interface, Fortinet’s only workaround. You lose GUI management until you re-enable it. Fortinet’s advisory gives no steps, so use the FortiWeb documentation for your version.
- Take management interfaces off the internet whatever else you do. Allow them only from an admin network or VPN.
- Assume compromise if an unpatched device was reachable since July 11, 2025. Check it (below). If you find anything:
- Rebuild the appliance on a fixed release. Upgrading doesn’t remove a web shell.
- Rotate secrets stored on it: admin passwords, API keys, certificate private keys and backend credentials.
- Look for movement from the appliance into the networks and servers it protects.
Detection
watchTowr and BleepingComputer describe the attack path. No vendor or researcher has published confirmed indicators, so these are hunting leads:
- Unexpected
.pthfiles in Python’ssite-packagesdirectory on the appliance (watchTowr). - Unexpected files in the CGI directory, and requests to
/cgi-bin/ml-draw.py(BleepingComputer, watchTowr). - Requests to
/api/fabric/device/statusand/api/v[0-9]/fabric/widgetwith anAuthorizationheader holding SQL metacharacters, comments or very long values (watchTowr). - Version check: watchTowr’s public detection script tests whether a device is vulnerable. Run it only against systems you own.
Indicators of compromise
Checked Fortinet, watchTowr, Shadowserver (via BleepingComputer and Help Net Security) and BleepingComputer. None published attacker IP addresses, file names or hashes. Use the paths in the Detection section as hunting leads, not as confirmed indicators.
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.