CVE-2023-6563Keycloak: offline session token dos
An unconstrained memory consumption vulnerability was discovered in Keycloak. It can be triggered in environments which have millions of offline tokens (> 500,000 users with each having at least 2 saved sessions). If an attacker creates two or more user sessions and then open the "consents" tab of the admin User Interface, the UI attempts to load a huge number of offline client sessions leading to excessive memory and CPU consumption which could potentially crash the entire system.
What to do
Fixed builds are available from Maven: see the table below for the fixed version per release.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Maven library | org.keycloak:keycloak-model-jpa | Fixed | 21.0.0 | GHSA-54f3-c6hg-865h |
What the vendor says
As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- Red Hat Single Sign-On 7.6 for RHEL 7
- Red Hat Single Sign-On 7.6 for RHEL 8
- Red Hat Single Sign-On 7.6 for RHEL 9
- Red Hat RHEL-8 based Middleware Containers
- Red Hat Single Sign-On 7.6.6
- Red Hat Build of Keycloak
Workaround: There are three main options to prevent exploitation: 1) If you are using a reverse proxy, block the consents URL. 2) This option is less effective: remove the consents application tab from the account console theme. 3) This option has a significant negative impact on end users: entirely disable offline user profiles.
Vendor advisories:
- https://access.redhat.com/errata/RHSA-2023:7854 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2023:7855 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2023:7856 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2023:7857 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2023:7858 (vendor-advisory)
References
- https://access.redhat.com/errata/RHSA-2023:7854
- https://access.redhat.com/errata/RHSA-2023:7855
- https://access.redhat.com/errata/RHSA-2023:7856
- https://access.redhat.com/errata/RHSA-2023:7857
- https://access.redhat.com/errata/RHSA-2023:7858
- https://access.redhat.com/security/cve/CVE-2023-6563
- https://bugzilla.redhat.com/show_bug.cgi?id=2253308
- https://github.com/keycloak/keycloak/issues/13340
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.