CVE-2024-21762: Fortinet FortiOS Out-of-Bound Write Vulnerability
A out-of-bounds write in Fortinet FortiOS versions 7.4.0 through 7.4.2, 7.2.0 through 7.2.6, 7.0.0 through 7.0.13, 6.4.0 through 6.4.14, 6.2.0 through 6.2.15, 6.0.0 through 6.0.17, FortiProxy versions 7.4.0 through 7.4.2, 7.2.0 through 7.2.8, 7.0.0 through 7.0.14, 2.0.0 through 2.0.13, 1.2.0 through 1.2.13, 1.1.0 through 1.1.6, 1.0.0 through 1.0.7 allows attacker to execute unauthorized code or commands via specifically crafted requests
CVE-2024-21762 is an out-of-bounds write vulnerability in Fortinet FortiOS. A remote, unauthenticated attacker can send specially crafted HTTP requests to execute code or commands on the device. This matters because FortiOS commonly sits at the network edge as a firewall or VPN gateway; successful exploitation can give an attacker full control of that perimeter device and open a path into the internal network. The vulnerability has been tied to known ransomware activity, so organizations running FortiOS should treat it as high priority.
How it works
The flaw is classified as CWE-787 (out-of-bounds write). In this class of bug, the software writes data past the end of an allocated buffer. When an attacker supplies a carefully formed HTTP request that triggers the write, the overflow can corrupt memory structures that control program execution. On a network appliance such as FortiOS, that corruption can be leveraged to run arbitrary code or system commands with the privileges of the vulnerable process—typically high privileges on the device itself. No authentication is required; the attacker only needs network reachability to the HTTP service that handles the request. Exact request formats and memory layouts are not detailed in the public summary and must be confirmed against the vendor advisory.
Am I affected? How to find it in your systems
FortiOS runs on Fortinet FortiGate firewalls, secure gateways, and related appliances that provide firewall, VPN, or web-filtering services. These devices are usually deployed at Internet-facing edges, in data-center perimeters, or as SSL-VPN concentrators.
- Inventory every FortiGate or other Fortinet appliance that runs FortiOS. Check management interfaces, asset-management databases, and network-discovery tools for devices advertising Fortinet services.
- Record the exact FortiOS version and build on each unit (available from the CLI or GUI). Compare those versions against the fixed releases listed in Fortinet’s advisory; do not rely on version ranges stated elsewhere.
- Confirm whether the HTTP or HTTPS administrative or SSL-VPN interfaces are reachable from untrusted networks. Devices that expose these services to the Internet are at highest risk.
- Review logs for anomalous HTTP requests directed at management or VPN ports, unexpected process crashes, or sudden configuration changes. Telemetry that shows successful remote code execution or ransomware-related indicators should be treated as potential compromise.
Specific vulnerable version ranges and configuration prerequisites must be verified against the official Fortinet advisory.
How to remediate
The primary remediation is to apply the vendor-supplied FortiOS update that addresses CVE-2024-21762. Follow Fortinet’s published instructions for downloading, validating, and installing the patch, then reboot or reload as required. After patching, re-verify the version string and confirm that the previously exposed HTTP services no longer accept the attack pattern.
- If the advisory lists additional configuration hardening steps (for example, disabling unused HTTP features or restricting management access), implement them immediately after the update.
- Where possible, replace any remaining end-of-life FortiOS releases with supported versions.
- Document the change and re-scan the device to ensure the vulnerability is closed.
CISA’s required action is to apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.
If you can't patch immediately
Until the vendor update can be installed, reduce exposure with compensating controls:
- Segment the FortiOS device so that its management and SSL-VPN interfaces are reachable only from trusted administrative networks or jump hosts; block direct Internet access to those ports at an upstream firewall or router.
- If a web application firewall or IPS is available in front of the device, enable any virtual-patching signatures that cover out-of-bounds write or FortiOS-specific HTTP anomalies; confirm signature coverage with the WAF vendor.
- Temporarily disable the HTTP-based feature that processes the vulnerable requests if business needs allow (for example, turn off SSL-VPN or restrict administrative HTTP access).
- Increase monitoring: forward FortiOS system and traffic logs to a SIEM, alert on unexpected reboots, configuration changes, or outbound connections that could indicate post-exploitation activity.
- Prepare an incident-response plan that includes taking the device offline and restoring from a known-good configuration if compromise is suspected.
These steps lower risk but do not eliminate it; schedule the official patch as soon as possible.
If your data may have been exposed
Actively exploited vulnerabilities of this type have been used by ransomware operators. If logs or other indicators suggest successful exploitation, assume the device and any credentials or sessions it held may be compromised. Isolate the appliance, preserve forensic images, rotate secrets that traversed the device, and follow your incident-response playbook. As a quick additional check, you can run a free exposure scan of your email addresses against known breach data to see whether related accounts appear in public dumps.
AICompiled with AI assistance from public sources and published under our editorial standards.
Details
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H