CVE-2021-42756

9.8 CRITICAL

📋 TL;DR

This critical vulnerability allows unauthenticated remote attackers to execute arbitrary code on FortiWeb web application firewalls via specially crafted HTTP requests. It affects multiple FortiWeb versions across the 5.x, 6.0, 6.1, 6.2, 6.3, and 6.4 branches. Organizations using vulnerable FortiWeb devices as internet-facing proxies are at immediate risk.

💻 Affected Systems

Products:
  • FortiWeb Web Application Firewall
Versions: FortiWeb 5.x all versions, 6.0.7 and below, 6.1.2 and below, 6.2.6 and below, 6.3.16 and below, 6.4 all versions
Operating Systems: FortiOS (Fortinet proprietary OS)
Default Config Vulnerable: ⚠️ Yes
Notes: All configurations with proxy daemon enabled are vulnerable. The vulnerability is in the proxy service itself.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise with attacker gaining root/administrator access to the FortiWeb device, allowing them to pivot to internal networks, steal sensitive data, deploy ransomware, or establish persistent backdoors.

🟠

Likely Case

Remote code execution leading to device takeover, configuration modification, traffic interception, and lateral movement to connected systems.

🟢

If Mitigated

Limited impact if device is patched, network segmentation prevents lateral movement, and strict access controls are in place.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

The vulnerability requires no authentication and affects a core service, making exploitation straightforward for attackers with knowledge of the vulnerability.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: FortiWeb 6.0.8, 6.1.3, 6.2.7, 6.3.17, 6.4.1 and later

Vendor Advisory: https://fortiguard.com/psirt/FG-IR-21-186

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 interface or CLI. 4. Reboot device. 5. Verify version and functionality.

🔧 Temporary Workarounds

Network Segmentation

all

Restrict access to FortiWeb management interfaces and proxy services to trusted networks only.

Access Control Lists

all

Implement strict firewall rules to limit which source IPs can communicate with FortiWeb proxy services.

🧯 If You Can't Patch

  • Immediately isolate vulnerable FortiWeb devices from internet exposure
  • Implement network-based intrusion prevention rules to block suspicious HTTP requests targeting FortiWeb

🔍 How to Verify

Check if Vulnerable:

Check FortiWeb firmware version via web interface (System > Status) or CLI command 'get system status'

Check Version:

get system status | grep Version

Verify Fix Applied:

Confirm firmware version is 6.0.8+, 6.1.3+, 6.2.7+, 6.3.17+, or 6.4.1+

📡 Detection & Monitoring

Log Indicators:

  • Unusual proxy daemon crashes or restarts
  • Suspicious HTTP requests with abnormal patterns or lengths
  • Unexpected process execution events

Network Indicators:

  • HTTP requests with abnormal payload sizes or patterns directed at FortiWeb proxy ports
  • Traffic spikes to FortiWeb management interfaces from untrusted sources

SIEM Query:

source="fortiweb" AND (event_type="crash" OR http_request_size>threshold)

🔗 References

📤 Share & Export