Skip to main content
Mallory
CriticalExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2022-42475: Unauthenticated Remote Code Execution in Fortinet SSL-VPN

Published Jan 2, 2023 · Updated 5 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days11 mentions · peak 8 in a dayToday
CVSS9.8Critical · v3.1
EPSS61.8%99th percentile
CISA KEVYesAdded Dec 13, 2022
In the wildActivePer CISA KEV
Vendor
Fortinet
IdentifiersCVE-2022-42475CWE-122

CVE-2022-42475 is a heap-based buffer overflow in the Fortinet SSL-VPN service, sslvpnd, that allows remote unauthenticated attackers to execute arbitrary code or commands through specially crafted requests. Affected releases include FortiOS 7.2.0–7.2.2, 7.0.0–7.0.8, 6.4.0–6.4.10, 6.2.0–6.2.11, and 6.0.15 and earlier; FortiProxy 7.2.0–7.2.1 and 7.0.7 and earlier are also affected. FortiOS-6K7K is additionally affected, with product-specific release guidance. Exploitation can compromise the appliance and may cause SSL-VPN service crashes. The vulnerability has been exploited in the wild, including before public disclosure.

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 arbitrary code or command execution on the affected appliance, compromising its security boundary and potentially providing an entry point into connected networks. Observed campaigns have used exploitation to deploy malware and establish persistent access. Subsequent compromise can expose configurations, credentials, and cryptographic material, and support lateral movement or data theft. Persistent modifications installed after exploitation may survive firmware updates; patching alone does not establish that a previously compromised appliance is trustworthy. Exploitation may also disrupt SSL-VPN availability through service crashes.

Mitigation

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

Disable SSL-VPN until fixed firmware can be installed. Review appliances for Fortinet-documented exploitation indicators, including repeated sslvpnd crashes with Signal 11, malicious filesystem artifacts, and suspicious outbound connections. Restrict unnecessary network reachability, segment connected networks, and retain security and access logs to reduce exposure and support investigation. These measures do not replace firmware updates or recovery from an established compromise.

Remediation

Patch, then assume compromise.

Upgrade affected FortiOS, FortiOS-6K7K, and FortiProxy appliances to the applicable fixed releases specified in Fortinet advisory FG-IR-22-398, following the supported upgrade path. Migrate unsupported branches to maintained, fixed releases. The FortiOS-6K7K 7.0 guidance contains an inconsistency: versions 7.0.0–7.0.8 are listed as affected while 7.0.8 or later is recommended; confirm the correct fixed release with Fortinet before relying on that version. Accompany patching with compromise assessment. For confirmed compromises, isolate the appliance, preserve forensic evidence, remove persistent modifications using vendor-assisted recovery procedures, reset potentially exposed secrets, and investigate connected systems for lateral movement.

Public exploits

Exploits

6 exploits validated by Mallory's analysis.

View more in app →
cve-2022-42475This repository contains a proof-of-concept exploit for CVE-2022-42475, a heap buffer overflow vulnerability in Fortinet's FortiOS SSL-VPN daemon. The main exploit script, 'cve-2022-42475.py', is a Python script that constructs a ROP chain to execute a reverse shell payload. The exploit targets the '/remote/error' endpoint of the SSLVPN service over SSL, sending a specially crafted POST request with a large payload to trigger the vulnerability. The payload includes hardcoded memory offsets and gadgets, making it highly version dependent and likely requiring adjustment for different target systems. Upon successful exploitation, the script establishes a reverse shell from the target to the attacker's machine on port 31337, executing a user-supplied command. The repository also includes a README with usage instructions and a disclaimer. No detection scripts or fake code are present; this is a functional exploit with operational-level maturity.Amir-hy · Disclosed Mar 16, 2023 · python · networkOperationalcve-2022-42475-FortinetThis repository contains a proof-of-concept exploit for CVE-2022-42475, a heap overflow vulnerability in Fortinet's SSLVPN daemon. The main file, cve-2022-42475.py, is a Python script that constructs a ROP chain to exploit the vulnerability and achieve remote code execution. The exploit works by sending a specially crafted HTTP POST request to the /remote/error endpoint of the target Fortinet device over SSL. The payload triggers the heap overflow and executes a reverse shell, connecting back to the attacker's machine on port 31337. The attacker can specify arbitrary commands to be executed on the target. The repository is structured simply, with a README providing usage instructions and a single exploit script. The exploit requires the attacker to set up a listener to receive the reverse shell. No detection or scanning functionality is present; this is a direct exploit script.Mustafa1986 · Disclosed Mar 22, 2023 · python · networkOperationalCVE-2022-42475This repository contains a working exploit for CVE-2022-42475, a pre-authentication remote code execution vulnerability in Fortinet FortiOS SSL VPN. The main exploit script (CVE-2022-42475.py) is a Python3 tool that can operate in several modes: vulnerability validation (crash detection), benign connect-back shellcode execution, and full payload delivery (implant deployment). The exploit leverages a buffer overflow in the SSL VPN webserver, using a custom ROP chain (constructed via foxrop.py and a required gadgets JSON file) to execute custom shellcode (provided in shellcode.s). The shellcode connects back to the attacker's machine, receives an encrypted payload (such as a Sliver implant), writes it to /tmp/x, and executes it. The exploit is operational but requires the operator to supply valid ROP gadget addresses for the target FortiOS version and hardware model. The README provides detailed usage instructions, requirements, and example output. The exploit targets FortiOS 6.0.4 on 100D hardware for full functionality, but the validation mode works across more versions. The main attack vector is network-based, targeting the SSL VPN web interface via a crafted HTTP POST request to /remote/logincheck. The repository includes Python code, an assembly shellcode file, and a requirements.txt for dependencies.0xhaggis · Disclosed Jun 21, 2023 · python · assembly · networkOperationalCVE-2022-42475-POCRepository contains a Python exploit for CVE-2022-42475 (Fortinet FortiGate/FortiOS SSL-VPN pre-auth RCE) plus helper code and assembly shellcode. The main entry point is CVE-2022-42475.py, which builds a malicious HTTP request leveraging a Content-Length integer overflow (default set to 2^32+1) to trigger memory corruption in the SSL-VPN daemon (sslvpnd). It supports: (1) validate-only mode that attempts to crash/restart the service and heuristically reports vulnerability; (2) a simple callback mode that executes minimal shellcode which connects back and sends a marker string; and (3) a full exploit mode that uses a ROP chain to call functions like mprotect/calloc and AES routines, then runs shellcode that stages an AES-encrypted operator-supplied binary, writes it to /tmp/x, and execve()s it. The exploit can optionally route traffic through a local Burp proxy (127.0.0.1:8080) using an HTTP CONNECT tunnel. TLS is auto-enabled for common HTTPS ports (443/8443/10443) unless overridden. The ROP construction logic is encapsulated in foxrop.py (class ROP), which imports gadget/function addresses from an external JSON file (referenced in README as exploit_data.json). This repository is explicitly a redacted release: without the proprietary gadget/address data, full RCE is not directly usable across targets, though the structure clearly implements a real exploitation chain. Included shellcode sources: shellcode.s implements the full connect-back stager (socket/connect, hello byte exchange, receive size + encrypted payload, AES-CBC decrypt using imported function pointers, write to /tmp/x, then execve). shellcode_callback.s is a minimal proof-of-execution payload that connects back and writes a model/marker string (e.g., 'PWNED'). requirements.txt pins pycryptodome for AES operations used by the Python-side payload encryption and coordination.ArthurHendrich · Disclosed Feb 27, 2026 · python · assembly · networkOperationalcve-2022-42475-pocThis repository is a small standalone Go proof-of-concept exploit for CVE-2022-42475, a pre-authentication heap-based buffer overflow in Fortinet FortiOS SSL VPN. The repository contains only two files: a README describing the vulnerability, affected versions, and usage, and a single Go source file implementing the exploit logic. The main exploit file, CVE-2022-42475.go, accepts a target host, target port, attacker callback IP, and shell arguments. It builds a malicious HTTPS POST request to the FortiOS SSL VPN endpoint /remote/error with an extremely large Content-Length and a large overflow buffer. The payload includes hardcoded ROP gadget addresses and a hardcoded base address, indicating the exploit is tailored to a specific target memory layout rather than broadly reliable across all builds. The ROP chain is designed to call execve and launch /bin/python on the target. It passes a Python payload that connects back to the attacker on TCP port 80, duplicates the socket onto stdin/stdout/stderr, forks, and executes /bin/sh with attacker-provided arguments such as /bin/sh -i. The exploit uses a raw TCP connection upgraded to TLS with certificate verification disabled, performs a handshake, sends headers and payload, then closes the write side immediately in a fire-and-forget manner. It optionally attempts to read a short response afterward. Operationally, the exploit provides unauthenticated remote code execution with a reverse shell if the target is vulnerable and the hardcoded addresses are correct. The code itself warns that the target may crash and that the base address may need brute forcing, so this is better characterized as an operational PoC than a polished weaponized exploit. Fingerprintable artifacts include the /remote/error endpoint, the TLS connection to the target SSL VPN port, the reverse callback to attacker IP:80, and the use of /bin/python and /bin/sh on the target.uLl0a · Disclosed Aug 25, 2026 · go · markdown · network · webOperationalcve-2022-42475This repository contains a proof-of-concept (POC) exploit for CVE-2022-42475, a heap overflow vulnerability in Fortinet's SSLVPN daemon (FortiOS). The main file, 'cve-2022-42475.py', is a Python script that constructs a ROP chain to execute a reverse shell payload on the target system. The exploit connects to the target's SSLVPN service over SSL, sends a specially crafted HTTP POST request to the '/remote/error' endpoint with a large payload designed to trigger the heap overflow, and attempts to execute a reverse shell back to the attacker's machine on port 31337. The payload uses /bin/python to create a socket and spawn /bin/sh, passing attacker-supplied arguments. The exploit is version dependent, with hardcoded offsets and addresses that may require adjustment for different target systems. The repository also includes a README.md that describes the exploit's limitations and version dependency. No detection scripts or fake code are present; this is a real exploit POC targeting a specific vulnerability in Fortinet FortiOS.scrt · Disclosed Feb 23, 2023 · 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
FortinetFortiproxyapplication
FAQ

Frequently asked questions

Is CVE-2022-42475 exploited in the wild?
Yes. As of Nov 24, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Dec 13, 2022.
Is there a public exploit for CVE-2022-42475?
Yes. Mallory tracks 6 public exploits or proofs of concept for CVE-2022-42475, the earliest disclosed Feb 23, 2023.
Is there a patch for CVE-2022-42475?
Upgrade affected FortiOS, FortiOS-6K7K, and FortiProxy appliances to the applicable fixed releases specified in Fortinet advisory FG-IR-22-398, following the supported upgrade path. Migrate unsupported branches to maintained, fixed releases.
What products are affected by CVE-2022-42475?
Fortinet Fortios and Fortinet Fortiproxy.
How severe is CVE-2022-42475?
CVE-2022-42475 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 61.8% (99th percentile) as of Nov 24, 2026.
Activity feed

Recent activity

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

View more in app →
detections digest rulecheckNews · Nov 23, 2026Detections Digest #20261123 - by RuleCheckMentioned as background context for an ngrok reverse-proxy detection rule. The digest does not identify the affected product, explain the vulnerability, or describe a specific exploitation incident.Read more ↗vulncheck blogNews · Nov 16, 2026Identifying FortiGate Firmware From a Single ClientHello | Blog | VulnCheckA pre-authentication SSL-VPN heap overflow associated with ransomware. The article identifies all 11,264 Gen 2 hosts as running affected versions; fingerprint-derived exposure does not establish exploitation of those hosts.Read more ↗zeropath blogNews · Nov 11, 2026Overview of CVE-2026-121528: FortiOS SSLVPN Web Portal Improper Certificate Validation Enabling Man in the Middle on the Backend Channel - ZeroPath Blog | ZeroPathA previously exploited FortiGate vulnerability mentioned as historical context. CISA reported an associated malicious file that could permit read-only filesystem access, including configurations, and recommended specific upgrades, configuration review and resetting potentially exposed credentials. The content does not describe the vulnerability's underlying mechanism or establish that the file itself exploited it.Read more ↗zeropath blogNews · Nov 11, 2026Brief Summary: FortiMail CVE-2026-126156, Unauthenticated IBE Recipient Account Takeover via Authorization Bypass - ZeroPath Blog | ZeroPathA FortiOS heap-based buffer overflow that could permit control of an affected system. CISA reported exploitation in December 2022. Mentioned as historical context, not as evidence of exploitation of the primary FortiMail vulnerability.Read more ↗
+62 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 evidence19Every report linking this CVE to a named adversary.
Associated malware20Malware families linked to this CVE, with evidence and IOCs.
Detection signatures2YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity6Community discussion across Reddit, Mastodon, and other social sources.