CVE-2024-5967 Keycloak: leak of configured ldap bind credentials through the keycloak admin console

Low 2.7 Published Updated

An admin can leak LDAP bind credentials by changing the connection URL to an attacker-controlled host, exposing domain credentials.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-5967?

CVE-2024-5967 is a low-severity vulnerability in Red Hat RHEL-8 based Middleware Containers, published on 18 Jun 2024. An attacker needs administrator access to exploit it, with no action from the victim.

Official description

A vulnerability was found in Keycloak. The LDAP testing endpoint allows changing the Connection URL  independently without re-entering the currently configured LDAP bind credentials. This flaw allows an attacker with admin access (permission manage-realm) to change the LDAP host URL ("Connection URL") to a machine they control. The Keycloak server will connect to the attacker's host and try to authenticate with the configured credentials, thus leaking them to the attacker. As a consequence, an attacker who has compromised the admin console or compromised a user with sufficient privileges can leak domain credentials and attack the domain.

Weakness: CWE-276

Which versions are affected by CVE-2024-5967?

6 open source packages ship an affected version, including org.keycloak:keycloak-ldap-federation.

PackageAffectedFixed in
org.keycloak:keycloak-ldap-federation MavenAll versions22.0.12
org.keycloak:keycloak-ldap-federation MavenAll versions22.0.12
org.keycloak:keycloak-ldap-federation MavenFrom 23.0.024.0.6
org.keycloak:keycloak-ldap-federation MavenFrom 23.0.024.0.6
org.keycloak:keycloak-ldap-federation MavenFrom 25.0.025.0.1
org.keycloak:keycloak-ldap-federation MavenFrom 25.0.025.0.1

How do I fix CVE-2024-5967?

Upgrade org.keycloak:keycloak-ldap-federation to a fixed version for your release line: 22.0.12, 24.0.6 or 25.0.1.

Is CVE-2024-5967 being exploited?

There is no known exploitation of CVE-2024-5967 in the wild and no public exploit code.

Sources

Also known as GHSA-c25h-c27q-5qpv.

Is CVE-2024-5967 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free