CVE-2025-25257

9.8 CRITICAL CISA KEV

📋 TL;DR

This SQL injection vulnerability in Fortinet FortiWeb web application firewalls allows unauthenticated attackers to execute arbitrary SQL commands via crafted HTTP/HTTPS requests. Affected organizations using vulnerable FortiWeb versions could have their web application protection bypassed and underlying databases compromised. The vulnerability affects FortiWeb versions 7.0.0-7.0.10, 7.2.0-7.2.10, 7.4.0-7.4.7, and 7.6.0-7.6.3.

💻 Affected Systems

Products:
  • Fortinet FortiWeb
Versions: 7.0.0 through 7.0.10, 7.2.0 through 7.2.10, 7.4.0 through 7.4.7, 7.6.0 through 7.6.3
Operating Systems: FortiOS
Default Config Vulnerable: ⚠️ Yes
Notes: All configurations of affected versions are vulnerable. The vulnerability requires HTTP/HTTPS access to the FortiWeb management interface or protected applications.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, data manipulation, or full system takeover via SQL command execution with administrative privileges.

🟠

Likely Case

Database information disclosure, authentication bypass, or limited data manipulation depending on database permissions and configuration.

🟢

If Mitigated

Limited impact due to proper input validation, database permissions restrictions, and network segmentation preventing lateral movement.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: CONFIRMED
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Public proof-of-concept code exists on GitHub, and CISA confirms active exploitation. The vulnerability requires no authentication and has low exploitation complexity.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: FortiWeb 7.6.4, 7.4.8, 7.2.11, 7.0.11

Vendor Advisory: https://fortiguard.fortinet.com/psirt/FG-IR-25-151

Restart Required: Yes

Instructions:

1. Download the appropriate firmware update from the Fortinet support portal. 2. Backup current configuration. 3. Apply firmware update via web GUI or CLI. 4. Reboot the FortiWeb appliance. 5. Verify the update was successful.

🔧 Temporary Workarounds

Restrict Network Access

all

Limit access to FortiWeb management interface and protected applications to trusted IP addresses only.

# Configure via FortiWeb GUI: System > Network > Interface > Edit > Access > Restrict Management Access

Enable WAF SQL Injection Protection

all

Ensure SQL injection protection policies are enabled and properly configured on all protected applications.

# Configure via FortiWeb GUI: Policy > Server Policy > Edit > Web Protection > SQL Injection

🧯 If You Can't Patch

  • Immediately restrict network access to FortiWeb interfaces using firewall rules to only allow trusted administrative IPs.
  • Monitor FortiWeb logs for SQL injection attempts and unusual database query patterns from the appliance.

🔍 How to Verify

Check if Vulnerable:

Check FortiWeb firmware version via GUI (System > Status) or CLI (get system status). Compare against affected versions.

Check Version:

get system status | grep Version

Verify Fix Applied:

Verify firmware version is 7.6.4, 7.4.8, 7.2.11, or 7.0.11 or later. Test with known safe SQL injection test payloads.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL query patterns in FortiWeb logs
  • HTTP requests with SQL injection payloads to FortiWeb interfaces
  • Failed authentication attempts followed by successful SQL commands

Network Indicators:

  • HTTP/HTTPS traffic to FortiWeb management interface from unexpected sources
  • Database connection attempts originating from FortiWeb appliance

SIEM Query:

source="fortiweb" AND ("sql" OR "injection" OR "union select" OR "' OR '1'='1")

🔗 References

📤 Share & Export