Skip to main content
Meet us at Black Hat USA 2026— Las Vegas, August 1–6Book a Meeting
Mallory
CriticalCISA KEVExploited in the wildPublic exploit

XORtigate: FortiOS/FortiProxy SSL-VPN Heap-Based Buffer Overflow RCE

IdentifiersCVE-2023-27997CWE-122· Heap-based Buffer Overflow

CVE-2023-27997 is a heap-based buffer overflow in the SSL-VPN component of Fortinet FortiOS and FortiProxy. According to the provided content, the flaw is in SSL-VPN pre-authentication request handling and can be triggered by a remote attacker via specifically crafted requests. Successful exploitation can corrupt heap memory and may allow arbitrary code or command execution on the affected device. The issue affects FortiOS 7.2.4 and below, 7.0.11 and below, 6.4.12 and below, and 6.0.16 and below, as well as FortiProxy 7.2.3 and below, 7.0.9 and below, 2.0.12 and below, and all 1.2 and 1.1 versions. The vulnerability is widely referred to as XORtigate in the supplied material.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation may allow unauthenticated remote code execution or arbitrary command execution on vulnerable FortiOS or FortiProxy appliances through the SSL-VPN interface. The provided content also associates the issue with high operational impact including potential data loss and OS or file corruption. Because the vulnerable component is an edge remote-access service, compromise can provide an attacker with a strong initial-access foothold into enterprise networks and enable follow-on persistence, credential theft, lateral movement, and broader infrastructure compromise.

Mitigation

If you can’t patch tonight, do this now.

If immediate patching is not possible, reduce exposure of the SSL-VPN service. The provided content states risk is mitigated if SSL-VPN is not enabled; therefore disabling SSL-VPN where not required is an effective temporary mitigation. Additional measures supported by the content include minimizing attack surface by disabling unused features, managing devices via out-of-band methods where possible, following Fortinet hardening guidance, aggressively reviewing systems for evidence of prior exploitation, and resetting credentials/secrets if compromise is suspected. Given later reporting of persistence surviving patching on previously compromised FortiGate devices, organizations should also inspect for post-compromise artifacts rather than assuming patching alone fully remediates prior intrusion.

Remediation

Patch, then assume compromise.

Upgrade affected FortiOS and FortiProxy systems to vendor-fixed releases. The provided content states affected versions are FortiOS 7.2.4 and below, 7.0.11 and below, 6.4.12 and below, and 6.0.16 and below; and FortiProxy 7.2.3 and below, 7.0.9 and below, 2.0.12 and below, and all 1.2 and 1.1 versions. Fortinet advised customers with SSL-VPN enabled to take immediate action to upgrade to the most recent firmware release. If compromise is suspected, patching alone may be insufficient; review device configurations and integrity, investigate for post-exploitation persistence, and rebuild or perform a clean installation of current firmware as appropriate based on incident-response findings.
PUBLIC EXPLOITS

Exploits

2 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos (4 hidden).

VALID 2 / 6 TOTALView more in app
fgt-cve-2023-27997-exploitMaturityPoCVerified exploit

This repository provides a Python proof-of-concept exploit for CVE-2023-27997, a critical heap-based buffer overflow vulnerability in Fortinet FortiGate SSL-VPN (FortiOS) devices. The exploit consists of a single main script ('fgt-cve-2023-27997-exploit.py'), a README.md with detailed usage and technical background, and a requirements.txt listing dependencies (requests, urllib3, numpy, scipy). The exploit works by first retrieving a 'salt' value from the target's '/remote/info' endpoint, then crafting a ROP chain payload (demonstrated with a ping command), encrypting it, and sending it to the vulnerable '/remote/hostcheck_validate' endpoint as the 'enc' parameter. The script is designed for authorized testing and demonstrates remote code execution (RCE) without authentication. The README provides affected version ranges for FortiOS and FortiProxy, usage instructions, and technical details about the vulnerability and exploit chain. The attack vector is network-based, targeting the SSL-VPN web interface. The exploit is a PoC and requires the attacker to specify the target IP and port.

onurkerembozkurtDisclosed Apr 18, 2025pythonnetwork
xortigate-cve-2023-27997MaturityPoCVerified exploit

This repository contains a proof-of-concept (POC) exploit for CVE-2023-27997, a critical remote code execution vulnerability in Fortinet FortiGate SSL VPN devices. The main file, 'exploit.py', is a heavily commented Python script that demonstrates the exploitation process, including buffer overflow and ROP chain construction, but does not provide a fully weaponized payload. The exploit requires the attacker to specify the target (host:port) and a local callback address. It uses custom SSL/TLS connections and crafts HTTP(S) requests to the '/remote/error' endpoint on the target device. The script is intended for educational purposes and does not include fingerprinting or vulnerability checks. The README.md provides a brief overview and points to a detailed blog post for further information. The exploit demonstrates the attack vector and methodology but is not directly usable for real-world attacks without further development.

lexfoDisclosed Oct 12, 2023pythonnetwork
EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
FortinetFortiosoperating_system
FortinetFortiproxyapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence13

Every observed campaign linking this CVE to a named adversary.

Associated malware8

Malware families riding this exploit, with evidence and IOCs.

Detection signatures1

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity1

Community discussion across Reddit, Mastodon, and other social sources.