CVE-2023-27997: Fortinet FortiOS and FortiProxy SSL-VPN Heap-Based Buffer Overflow Vulnerability
Fortinet FortiOS and FortiProxy SSL-VPN contain a heap-based buffer overflow vulnerability which can allow an unauthenticated, remote attacker to execute code or commands via specifically crafted…
CVE-2023-27997 is a heap-based buffer overflow in the SSL-VPN component of Fortinet FortiOS and FortiProxy. An unauthenticated remote attacker can trigger it by sending specially crafted requests, potentially leading to execution of code or commands on the device. Because SSL-VPN interfaces are commonly exposed to the internet and the vulnerability has been used by ransomware operators, organizations running these products should treat it as high priority and confirm exact impact against the vendor advisory.
The flaw allows remote compromise without credentials, which can give an attacker a foothold on the network edge and enable further lateral movement or ransomware deployment. Defenders need clear inventory, rapid patching, and temporary controls while updates are applied.
How it works
This vulnerability is classified as CWE-122, a heap-based buffer overflow. In products that process network requests, insufficient bounds checking on data written to the heap can allow an attacker to overwrite adjacent memory. For FortiOS and FortiProxy SSL-VPN, the CISA summary states that specifically crafted requests can exploit this condition, enabling unauthenticated remote code or command execution.
An attacker does not need valid credentials; they only need network reachability to the SSL-VPN service. Successful exploitation can result in full control of the appliance under the privileges of the affected process. Exact request formats and memory layouts are not detailed in the public summary and must be confirmed against the vendor advisory; defenders should assume any internet-facing SSL-VPN instance is a potential target until proven otherwise.
Am I affected? How to find it in your systems
FortiOS and FortiProxy appliances that have the SSL-VPN feature enabled are in scope. These devices typically sit at the network perimeter to provide remote access. Inventory every Fortinet firewall, gateway, or proxy that terminates SSL-VPN traffic.
- Query asset management, configuration management databases, and network discovery tools for FortiOS and FortiProxy instances.
- On each device, verify whether the SSL-VPN service is enabled and note the software version; compare those versions against the fixed releases listed in the vendor advisory.
- Review management interfaces and CLI output for SSL-VPN configuration status and any recent changes.
- Examine SSL-VPN access logs, system event logs, and traffic telemetry for anomalous request patterns, unexpected process crashes, or connections from unusual sources that coincide with the vulnerability disclosure window.
- If centralized logging or SIEM is available, search for indicators of exploitation attempts against the SSL-VPN ports and paths; treat any unexplained restarts or shell activity as suspicious until investigated.
Public detail on exact vulnerable version ranges is limited here; always confirm against the official Fortinet advisory before declaring a system safe.
How to remediate
The primary remediation is to apply the updates released by Fortinet for FortiOS and FortiProxy as instructed in the vendor advisory. CISA requires organizations to apply those updates per the vendor’s guidance.
- Download and install the patched firmware or software packages from official Fortinet channels only.
- Follow the vendor’s upgrade path and any required reboot or configuration validation steps.
- After patching, re-verify that the SSL-VPN service is running the fixed version and that no residual vulnerable components remain.
- As a general hardening measure for this class of flaw, keep SSL-VPN software current, restrict administrative access, and ensure only necessary features are enabled.
Once the update is applied, continue monitoring for signs of prior compromise, because an attacker who already exploited the overflow may have left persistence mechanisms.
If you can't patch immediately
If immediate patching is not possible, implement compensating controls to reduce exposure until the vendor update can be installed.
- Segment the SSL-VPN devices so that successful compromise does not grant unrestricted access to internal networks; apply strict firewall rules and least-privilege routing.
- Place a web application firewall or reverse proxy in front of the SSL-VPN service and enable virtual patching or signature-based blocking for known exploit patterns associated with this vulnerability class, confirming signatures against current threat intelligence.
- If business requirements allow, temporarily disable the SSL-VPN feature or restrict it to a limited set of trusted source IP ranges.
- Increase logging and alerting on the SSL-VPN interface, process crashes, and authentication events; forward logs to a SIEM for real-time review.
- Monitor for ransomware indicators and unusual outbound connections originating from the Fortinet devices themselves.
These measures lower risk but do not eliminate it; schedule the official update as soon as operationally feasible.
If your data may have been exposed
Actively exploited vulnerabilities of this type, especially those with known ransomware use, frequently lead to data theft or encryption. If your FortiOS or FortiProxy SSL-VPN instances were reachable and unpatched during the period of known exploitation, assume potential compromise and investigate accordingly. Review device logs, network traffic, and endpoint telemetry for evidence of unauthorized access. Organizations can also run a free exposure scan of their email addresses against known breach data sets to determine whether credentials or other information associated with their domain have already appeared in public breach collections.
AICompiled with AI assistance from public sources and published under our editorial standards.