It has been over five years in the making, but Fortinet observed abuse of the July 2020 vulnerability FG-IR-19-283/CVE-2020-12812 based on specific configurations.

In specific configurations, due to differences in behavior of Lightweight Directory Access Protocol (LDAP) Directories, FortiGate can allow LDAP users with two-factor authentication (2FA) configured to bypass 2FA and instead authenticate against LDAP directly, according to a report from Fortinet PSIRT.

This authentication behavior ends up caused by FortiGate treating usernames as case-sensitive by default, when the LDAP Directory does not.

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. Example: user jsmith is a member of ‘Domain Users’, ‘Helpdesk’.
  • At least one LDAP group the two-factor users are a member of needs to end up onfigured on FortiGate e.g. ‘Domain Users’,
  • ‘Helpdesk’, and the group needs to be in an authentication policy which could include for example administrative users, SSL or IPSEC VPN.
Triggering Affect

With those prerequisites in place, the issue can end up triggered as follows:

Schneider Bold
  • If the user logs into VPN with ‘jsmith’, the token ends up requested, as this matches the local user.
  • If the user logs in with ‘Jsmith’, or ‘jSmith’, or ‘JSmith’, or ‘jsmiTh’ or anything that is NOT an exact case match to ‘jsmith’, the FortiGate will not match the login against the local user.

This configuration causes FortiGate to consider other authentication options. The FortiGate will check through other configured firewall authentication policies.

After failing to match jsmith, FortiGate finds the secondary configured group ‘Auth-Group’, and from it the LDAP server and provided the credentials are correct, authentication will be successful regardless of any settings within the local user policy (2FA and disabled accounts).

This can result in admin or VPN users authenticated without 2FA. If this has occurred, there is a compromise in the system and the user should reset all credentials including those used in LDAP/AD Binding.

Additional configuration to prevent this FortiGate behavior released in FortiOS 6.0.10, 6.2.4, 6.4.1 as part of FG-IR-19-283 published in July 2020.

If your organization did not deploy FortiOS 6.0.10, 6.2.4, 6.4.,1 to mitigate the issue, the following should be set on all local accounts:
set username-case-sensitivity disable

or on later versions (v6.0.13, v6.2.10, v6.4.7, v7.0.1 and above):
set username-sensitivity disable

Click here for more on the issue.

Pin It on Pinterest

Share This