The ldap-auth and ldap-auth-advanced plugins in Kong Gateway Enterprise and Kong AI Gateway improperly handle TLS settings when caching credentials. This flaw allows a man-in-the-middle attacker to have credentials validated against a spoofed LDAP server even when certificate verification is enabled.