Bug 2317440 (CVE-2024-9666)

Summary: CVE-2024-9666 org.keycloak/keycloak-quarkus-server: Keycloak proxy header handling Denial-of-Service (DoS) vulnerability
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: asoldano, bbaranow, bmaxwell, boliveir, brian.stansberry, cdewolf, chazlett, darran.lofthouse, dkreling, dosoudil, drichtar, fjuma, istudens, ivassile, iweiss, jkoops, lgao, mosmerov, msochure, msvehla, nwallace, pdrozd, peholase, pesilva, pjindal, pmackay, pskopek, rmartinc, rowaters, rstancel, security-response-team, smaestri, sthorger, tom.jenkinson
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A vulnerability was found in the Keycloak Server. The Keycloak Server is vulnerable to a denial of service (DoS) attack due to improper handling of proxy headers. When Keycloak is configured to accept incoming proxy headers, it may accept non-IP values, such as obfuscated identifiers, without proper validation. This issue can lead to costly DNS resolution operations, which an attacker could exploit to tie up IO threads and potentially cause a denial of service. The attacker must have access to send requests to a Keycloak instance that is configured to accept proxy headers, specifically when reverse proxies do not overwrite incoming headers, and Keycloak is configured to trust these headers.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Deadline: 2024-11-21   

Description OSIDB Bzimport 2024-10-08 22:38:19 UTC
Keycloak versions 26 and earlier are vulnerable to a denial-of-service (DoS) attack through improper handling of proxy headers. When Keycloak is configured to accept incoming proxy headers, it may accept non-IP values, such as obfuscated identifiers, without proper validation. This can lead to costly DNS resolution operations, which an attacker could exploit to tie up IO threads and potentially cause a denial of service.

The attacker must have access to send requests to a Keycloak instance that is configured to accept proxy headers, specifically when reverse proxies do not overwrite incoming headers, and Keycloak is configured to trust these headers.

For Keycloak version 26, for successful exploitation includes: the realm must have SslRequired=EXTERNAL (the default), HTTP must be enabled, the instance must not be using a full hostname URL, access must come from behind a proxy (assuming the proxy overwrites the X-Forwarded-For header), and trusted proxies must not be set or must incorrectly trust the client from which the request is originating.

Comment 2 errata-xmlrpc 2024-11-21 19:23:34 UTC
This issue has been addressed in the following products:

  Red Hat build of Keycloak 24

Via RHSA-2024:10175 https://access.redhat.com/errata/RHSA-2024:10175

Comment 3 errata-xmlrpc 2024-11-21 19:23:50 UTC
This issue has been addressed in the following products:

  Red Hat build of Keycloak 24.0.9

Via RHSA-2024:10176 https://access.redhat.com/errata/RHSA-2024:10176

Comment 4 errata-xmlrpc 2024-11-21 19:24:36 UTC
This issue has been addressed in the following products:

  Red Hat build of Keycloak 26.0

Via RHSA-2024:10177 https://access.redhat.com/errata/RHSA-2024:10177

Comment 5 errata-xmlrpc 2024-11-21 19:24:47 UTC
This issue has been addressed in the following products:

  Red Hat build of Keycloak 26.0.6

Via RHSA-2024:10178 https://access.redhat.com/errata/RHSA-2024:10178

Comment 6 Chess Hazlett 2024-11-27 21:47:03 UTC
resolved in https://github.com/keycloak/keycloak/pull/35247/files

Comment 7 Chess Hazlett 2024-11-27 21:47:36 UTC
(issue: https://github.com/keycloak/keycloak/issues/35216)