Skip to main content
Mallory
CriticalExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2023-27997: XORtigate

Published Jun 13, 2023 · Updated 1 day ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days1 mention · peak 1 in a dayToday
CVSS9.8Critical · v3.1
EPSS86.8%100th percentile
CISA KEVYesAdded Jun 13, 2023
In the wildActivePer CISA KEV
Vendor
Fortinet
IdentifiersCVE-2023-27997CWE-122 · Heap-based Buffer Overflow

CVE-2023-27997, also known as XORtigate, is a pre-authentication heap-based buffer overflow in the SSL-VPN functionality of Fortinet FortiOS and FortiProxy. Specially crafted requests can corrupt heap memory and allow a remote unauthenticated attacker to execute arbitrary code or commands on an affected appliance. Affected releases include FortiOS 7.2.4 and earlier, 7.0.11 and earlier, 6.4.12 and earlier, and 6.0.16 and earlier within their respective branches; FortiProxy 7.2.3 and earlier, 7.0.9 and earlier, and 2.0.12 and earlier within their respective branches; and all FortiProxy 1.1 and 1.2 releases. FortiOS 7.4 is not affected. Exploitation was observed before patches became available in June 2023.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

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

Successful exploitation permits unauthorized code or command execution on the SSL-VPN appliance without credentials. Appliance compromise can expose configuration data, credentials, and cryptographic material, enable configuration changes and backdoor installation, and provide a foothold for access to internal networks. Post-exploitation activity associated with this vulnerability has included persistence that survived patching. The vulnerability has been exploited in espionage and ransomware-related intrusions.

Mitigation

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

Disable SSL-VPN until a fixed release can be installed. Reduce exposure by restricting access to necessary trusted networks and applying Fortinet hardening guidance. MFA does not prevent exploitation because the vulnerable processing occurs before authentication.

Remediation

Patch, then assume compromise.

Upgrade affected installations using Fortinet's supported upgrade path to a current supported release containing the fix. Fixed FortiOS releases include 6.0.17, 6.2.15, 6.4.13, 7.0.12, and 7.2.5. Apply the product-specific fixed releases for FortiOS-6K7K and FortiProxy; FortiProxy 1.1 and 1.2 require migration to a fixed release. For confirmed compromise, patching alone is insufficient: isolate the appliance, preserve evidence, rebuild or replace it as appropriate, rotate configured and potentially exposed secrets, and investigate persistence and downstream lateral movement.

Public exploits

Exploits

3 exploits validated by Mallory's analysis. Hidden: 7 rejected by Mallory's analysis as not a working exploit.

View more in app →
Fortigate-SSL-VPN-Exploit-KitThis is a 100-file exploit catalog rather than a detection-only repository: the supplied structure contains README.md, .gitignore, and 98 standalone Python clients in exp/. Filenames encode a FortiGate appliance SKU and exact FortiOS build, spanning models such as 30E through 3000D and firmware trains from 6.0 through 7.4. The critical asset is the per-image offset/gadget matrix: every client hardcodes build-specific stack layouts, BSS/GOT/function addresses, ROP gadgets, object sizes, and spray parameters. The code implements two unauthenticated SSL-VPN RCE families identified in the README as CVE-2024-21762 and CVE-2023-27997. CVE-2024-21762-style clients issue malformed chunked POST requests to /aaaa/bbbb while spraying /remote/error or /remote/hostcheck_validate. They corrupt request-processing state, redirect control flow through per-build ROP chains, and invoke FortiGate's internal execute_cmd routine. CVE-2023-27997-style clients first obtain a dynamic salt from /remote/info, reproduce the MD5/XOR enc= encoding, calculate seeds for controlled byte writes, spray SSL-related objects, and overwrite an indirect target/GOT entry to execute attacker-controlled commands. Payload delivery has three observed forms: direct Node.js HTTP retrieval and eval of a configurable /s.js URL; TFTP retrieval of s.js into /tmp/s followed by Node execution; and x86-64/ARM raw-payload stagers. The latter obtain a length-prefixed second stage from a configurable TCP service, allocate executable memory, execute the received bytes, and make a second configurable TCP callback that functions as a reverse shell channel. TLS certificate verification is disabled throughout. Many clients repeatedly attack in parallel, with hardcoded CPU/thread counts and high connection/spray volumes, indicating reliability tuning rather than a minimal PoC. No fixed victim IP, domain, or attacker infrastructure is embedded. Target and callback hosts/ports are command-line supplied, so the fingerprintable observables are primarily the SSL-VPN paths, malformed chunked-transfer patterns, unusually large form/hostcheck requests, the FortiSSLVPN user agent, requests to /remote/info, and outbound target traffic to operator-selected HTTP, TFTP, or raw TCP services. README references additional launcher, listener, shellcode, and JavaScript files, but those are not present in the supplied file listing; conclusions about their contents are therefore limited to the README's description.abraxas · Disclosed Sep 1, 2026 · python · assembly · network · webOperationalxortigate-cve-2023-27997This 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.lexfo · Disclosed Oct 12, 2023 · python · networkPoCfgt-cve-2023-27997-exploitThis 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.onurkerembozkurt · Disclosed Apr 18, 2025 · python · networkPoC
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
FortinetFortios-6k7kapplication
FortinetFortiproxyapplication
FAQ

Frequently asked questions

Is CVE-2023-27997 exploited in the wild?
Yes. As of Nov 16, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Jun 13, 2023.
Is there a public exploit for CVE-2023-27997?
Yes. Mallory tracks 3 public exploits or proofs of concept for CVE-2023-27997, the earliest disclosed Oct 12, 2023.
Is there a patch for CVE-2023-27997?
Upgrade affected installations using Fortinet's supported upgrade path to a current supported release containing the fix. Fixed FortiOS releases include 6.0.17, 6.2.15, 6.4.13, 7.0.12, and 7.2.5.
What products are affected by CVE-2023-27997?
Fortinet Fortios, Fortinet Fortiproxy, and Fortinet Fortios-6k7k.
How severe is CVE-2023-27997?
CVE-2023-27997 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 86.8% (100th percentile) as of Nov 16, 2026.
Activity feed

Recent activity

62 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
+45 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

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, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidence20Every report linking this CVE to a named adversary.
Associated malware16Malware families linked to this CVE, with evidence and IOCs.
Detection signatures8YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity2Community discussion across Reddit, Mastodon, and other social sources.