ZeroHour
Security Affairspublished ()ingested @securityaffairs

Five-year-old Fortinet FortiOS SSL VPN flaw actively exploited

criticalRansomware exploited in the wildimportance 60CVE-2020-12812CVE-2018-13379CVE-2019-5591

Vulnerabilities mentionedAll →

CVEVulnerabilityCVSSEPSSFlagsAffectedExposurePublished
CVE-2018-13379
Unauthenticated Path Traversal in Fortinet FortiOS SSL VPN

CVE-2018-13379 is a path traversal flaw (CWE-22) in the Fortinet FortiOS SSL VPN web portal that allows an unauthenticated attacker to download FortiOS system files via specially crafted HTTP resource requests. By traversing directories through crafted requests to the exposed web portal, the attacker can retrieve sensitive files, a technique publicly documented as yielding the SSL VPN session file containing usernames and passwords in plaintext. Any organization running the SSL VPN web portal on a FortiGate appliance is affected, and risk is highest where the portal is directly reachable from the internet. The flaw is confirmed in the wild: it was added to the CISA KEV catalog on 2021-11-03 with known ransomware use, and EPSS assigns it a 100% probability of exploitation within 30 days. No public PoC is listed in the provided data, but credential theft tied to this bug has been widely reused by threat actors.

Do: Apply the patched FortiOS release per Fortinet's vendor advisory immediately, as this is a CISA KEV required action; if the fixed version is not known from this data, follow Fortinet's FG-IR-18-384 advisory for the correct upgrade path. Rotate SSL VPN credentials and review VPN access logs for path-traversal requests, since successful exploitation exposes plaintext session credentials, and restrict SSL VPN portal exposure to trusted sources where possible.

9.8100% KEV ransomware
  • Fortinet FortiOS
mass≈500,000 internet-exposed FortiOS SSL VPN portals (Fortinet cited ~480,000 affected devices)
CVE-2019-5591
Default-Configuration LDAP Impersonation in Fortinet FortiOS

CVE-2019-5591 is a default-configuration flaw in Fortinet FortiOS (CWE-306, missing authentication for a critical function): when a FortiGate acts as an LDAP client over SSL/TLS for authentication purposes, the default configuration does not properly authenticate the LDAP server, allowing an unauthenticated attacker on the same subnet to impersonate the LDAP server. The attack requires adjacency (the attacker must be on the same network segment as the device's LDAP traffic) and only works where the device uses LDAP over TLS with the default, non-validating settings. A successful attacker can intercept sensitive authentication information, such as usernames and passwords, exchanged with the LDAP server, with high confidentiality impact but no integrity or availability impact per the CVSS score. Organizations running affected FortiOS releases with LDAP-over-TLS configured are exposed; FortiOS runs on one of the largest firewall/VPN installed bases, though the source data does not state exact affected version ranges or deployment counts. The flaw is listed in CISA's Known Exploited Vulnerabilities catalog (added 2021-11-03) with known in-the-wild and ransomware use; late-2021 CISA and FBI advisories warned that APT actors were exploiting Fortinet bugs, including this one, for initial access, and no public PoC is known.

Do: Upgrade affected FortiGate/FortiOS units to a fixed release (6.2.1+, 6.0.8+, 5.6.10+, or 5.4.12+) per Fortinet's instructions, as required by CISA's KEV listing. If patching is delayed, disable the use of SSL/TLS in the LDAP server configuration or restrict and monitor the network path between the FortiGate and the LDAP server. Inventory which devices use LDAPS for authentication and review authentication logs for signs of server impersonation or credential theft.

6.518% KEV ransomware
  • Fortinet FortiOS FortiOS 6.2.0; 6.0.0-6.0.7; 5.6.0-5.6.9; 5.4.0-5.4.11 (fixed in 6.2.1, 6.0.8, 5.6.10 and 5.4.12, per the Fortinet PSIRT advisory; CISA data confirms FortiOS as
largetens of thousands of FortiGate deployments plausibly affected (a subset of a very large FortiOS installed base that connects to LDAP over TLS)
CVE-2020-12812
MFA Bypass via Username Case Change in Fortinet FortiOS SSL VPN

Fortinet FortiOS SSL VPN improperly validates the second factor of authentication (FortiToken), allowing a user with valid primary credentials to log in without being prompted for their one-time token. The bypass is triggered by changing the letter case of the username (e.g., typing 'Admin' instead of 'admin'), a case-sensitivity handling flaw (CWE-178) in the authentication logic (CWE-287). An attacker who has stolen, phished, or reused a user's primary credentials can therefore gain full SSL VPN access without the multi-factor protection defenders assume is enforced. Any organization running an affected FortiOS SSL VPN portal with FortiToken two-factor authentication for users is exposed. The flaw is in CISA's Known Exploited Vulnerabilities catalog (added 2021-11-03) with known ransomware use, and EPSS assigns a 49.3% probability of exploitation within 30 days (99th percentile); no public PoC is known.

Do: Apply the FortiOS update per Fortinet's advisory, as required by CISA's KEV listing. Until patched, audit SSL VPN logs for successful logins in which no FortiToken second-factor prompt occurred (especially sessions authenticating with altered username case), and consider restricting the SSL VPN portal to trusted source addresses or disabling it temporarily. Any accounts found with second-factor-free VPN logins should have credentials rotated and be checked for follow-on compromise, given known ransomware use.

9.849% KEV ransomware
  • Fortinet FortiOS
masson the order of hundreds of thousands of internet-exposed FortiOS SSL VPN portals (public scans in 2020-2021 counted roughly 150,000-500,000)
Full article686 words · extracted from securityaffairs.com · click to collapse

Pierluigi Paganini December 25, 2025

Fortinet reported active exploitation of a five-year-old FortiOS SSL VPN flaw, abused in the wild under specific configurations.

Fortinet researchers observed “recent abuse” of a five-year-old security vulnerability, tracked as CVE-2020-12812 (CVSS score: 5.2), in FortiOS SSL VPN. The vulnerability is exploited in attacks in the wild under certain configurations.

CVE-2020-12812 is an improper authentication flaw in FortiOS SSL VPN that may allow users to bypass two-factor authentication by changing the case of the username, enabling successful login without being prompted for the second authentication factor.

“An improper authentication vulnerability in SSL VPN in FortiOS may result in a user being able to log in successfully without being prompted for the second factor of authentication (FortiToken) if they changed the case of their username.” reads the advisory published by the vendor.
“This happens when two-factor authentication is enabled in the “user local” setting, and that user authentication type is set to a remote authentication method (eg: ldap). The issue exists because of inconsistent case sensitive matching among the local and remote authentication.”

In certain setups, FortiGate may let LDAP users bypass 2FA due to case-sensitive username handling, while LDAP is case-insensitive. If a user enters a differently cased username, FortiGate may skip the local 2FA user and authenticate directly via LDAP group policies. This can allow admin or VPN access without 2FA, potentially compromising systems and requiring full credential resets.

The issue occurs when FortiGate has local 2FA users linked to LDAP, the same users belong to LDAP groups used in authentication policies, and username case differs at login. A case mismatch prevents matching the local 2FA user, causing FortiGate to fall back to LDAP authentication and potentially bypass 2FA.

“This particular authentication behavior is caused by FortiGate treating usernames as case-sensitive by default, when the LDAP Directory does not.” states Fortinet.

“To trigger this issue, an organization must have the following configuration present:

  • Local user entries on the FortiGate with 2FA, referencing back to LDAP
  • The same users need to be members of a group on the LDAP server
  • At least one LDAP group the two-factor users are a member of needs to be configured on FortiGate, and the group needs to be used in an authentication policy which could include for example administrative users, SSL, or IPSEC VPN”

Fortinet addressed the vulnerability in FortiOS 6.0.10, 6.2.4, and 6.4.1 in July 2020.

Organizations that are not yet running the affected FortiOS releases can mitigate the authentication bypass by executing the following command for all local users:

set username-case-sensitivity disable

Customers using FortiOS 6.0.13, 6.2.10, 6.4.7, 7.0.1, or newer should instead apply this setting:

set username-sensitivity disable

Disabling username sensitivity makes FortiGate treat all username case variations as the same, preventing fallback to misconfigured LDAP groups.

In April 2021, the Federal Bureau of Investigation (FBI) and the Cybersecurity and Infrastructure Security Agency (CISA) published a joint alert to warn of attacks carried out by APT groups targeting Fortinet FortiOS servers using multiple exploits, including CVE-2020-12812.

In July 2021, the U.S. Cybersecurity and Infrastructure Security Agency (CISA), the Australian Cyber Security Centre (ACSC), the United Kingdom’s National Cyber Security Centre (NCSC), and the U.S. Federal Bureau of Investigation (FBI) published a Joint Cybersecurity Advisory that provides details on the top 30 vulnerabilities exploited by threat actors in 2020, including CVE-2020-12812.

In March 2021, Iran-linked APT groups leveraged Fortinet FortiOS vulnerabilities such as CVE-2018-13379CVE-2019-5591, and CVE-2020-12812 to gain access to target networks.

In May 2022, researchers at Secureworks Counter Threat Unit (CTU) investigated a series of attacks conducted by the Iran-linked COBALT MIRAGE APT group. The threat actors have been active since at least June 2020 and are linked to the Iranian COBALT ILLUSION group (aka APT35Charming KittenPHOSPHOROUS and TunnelVision).

The researchers identified two distinct clusters of intrusions (labeled as Cluster A and Cluster B) associated with COBALT MIRAGE who was spotted exploiting CVE-2020-12812.

The Hive ransomware operators were also observed exploiting the same flaw in 2022 attacks.

Follow me on Twitter: @securityaffairs and Facebook and Mastodon

Pierluigi Paganini

(SecurityAffairs – hacking, Fortinet)



Text extracted automatically; images, tables and formatting may be missing. Original: https://securityaffairs.com/186117/security/five-year-old-fortinet-fortios-ssl-vpn-flaw-actively-exploited.html