Keycloak vulnerability management and security patching

A practical plan for watching Keycloak advisories, judging which CVEs reach your configuration, patching the server with minimal downtime and keeping custom providers current.

On this page

Keycloak vulnerability management and security patching starts with knowing what you run

Patching Keycloak starts with knowing exactly which version and distribution you run, which features and providers it loads, and which of them face the internet. This page covers how to track Keycloak advisories, which release line receives fixes, how to judge severity for your own configuration, and how to patch without breaking sign-in. Keycloak is an identity provider that sits in front of many applications, so a patch that fails or causes a login outage affects every one of them. Keycloak is licensed under Apache 2.0, the current release is 26.8.1 (published October 13, 2026), and the project plans four minor releases a year. Patching is therefore a recurring operating task, not a one-time project.

Teams need this discipline most when Keycloak is in a regulated environment, when the login endpoints are reachable from the internet, or when custom SPI providers, themes or extensions run inside the server. Start with a written inventory: the exact Keycloak version or Red Hat build of Keycloak version, how it is deployed (container image, Operator, virtual machine or package), the database it uses, the reverse proxy in front of it, and every custom provider with its dependencies. Confirm with your vendor or distribution which version line receives security fixes for your deployment model, because the upstream project and a supported Red Hat build may follow different schedules. Without this inventory, you cannot tell whether a published advisory affects you at all.

Once the inventory exists, the next decision is how quickly you will evaluate each new release. Upstream release notes and the upgrade notes for each minor version list behavior changes that matter for patching. For example, the 26.8 upgrade notes made SMTP StartTLS mandatory without plaintext fallback and required signature validation of backchannel logout tokens from external providers, so a patch can change how your integrations behave. Test each candidate build in a staging realm that mirrors your clients, identity providers and custom providers, and keep a tested rollback path. Teams should ask their own platform owners and, if they use a partner, the written scope for who monitors advisories, who approves a patch and who verifies sign-in afterward.

Build a patch intake process for Keycloak advisories

This sequence gives your team a repeatable way to learn about Keycloak releases and advisories, decide which ones touch your configuration, and move a tested build into production with a rollback path. The output is a written intake record that shows who triages each release and what was checked before it went live.

  1. Subscribe to upstream release signals

    Subscribe the platform team to release notifications on the keycloak/keycloak GitHub repository and follow the project announcements on keycloak.org, so new releases and security notes reach a shared channel rather than one person's inbox. Confirm the subscriptions by checking that a test notification reaches every person on the triage list. If you run the Red Hat build of Keycloak, also subscribe to its product channel, because its release timing and patched builds can differ from upstream. Done means the channel and the subscriptions are documented with owners.

  2. Record the exact running version and distribution

    Record the Keycloak version your environment actually runs, the distribution (upstream image, Red Hat build, or a custom build), and the image digest or artifact checksum. Pull this from the deployed artifact and from the admin console server information, not from a deployment template that may be out of date. Compare the two values. Done means the inventory entry matches the running server and the deployed image tag, and any mismatch has been investigated and closed.

  3. Inventory the features and extensions in use

    List the features your realms actually use: user federation (LDAP, Active Directory, Kerberos), identity brokering with upstream providers, custom SPI providers, themes, enabled metrics, and any Organizations or passkey settings. For each custom provider, record the author, the Keycloak version it was built against, and its third-party dependencies. Advisories are only useful when you can match them to something you run, so this inventory is the matching key. Done means every feature and extension has a row with an owner and a version.

  4. Assign a named triage owner and backup

    Name one person who reads each new release and advisory, decides whether it affects your configuration, and opens the change record. Name a backup for absence cover. Write the decision rule down: which advisories trigger an out-of-cycle patch and which wait for the next planned window. Confirm the owner has read access to the release channels and write access to the change tracker. Done means the triage duties, the backup and the decision rule are recorded in your operations runbook.

  5. Assess each advisory against your configuration

    For each advisory, compare the affected components and conditions with your inventory. Ask whether the vulnerable feature is enabled, whether the endpoint is reachable from untrusted networks, whether your admin console is exposed, and whether a custom provider touches the same code path. Record the result as affected, not affected with reasons, or needs confirmation, and name the source you checked. Done means each advisory has a written assessment that a reviewer can follow.

  6. Test the release in a staging realm that mirrors production

    Deploy the candidate version to a staging environment built from the same configuration export as production, with the same clients, identity providers, themes and custom providers. Run login, token refresh, logout, federation sync and your application smoke tests against it. Review the upgrade notes for behavior changes that are opt-in or enforced in the target release, such as stricter mail or logout token validation, and confirm your configuration still works. Done means the test results are attached to the change record and any failures have a fix or a blocking decision.

  7. Keep a tested rollback path before promotion

    Before promoting the build, take a database backup, store the current image digest, and confirm you can redeploy the previous version against the same database. Note that schema migration runs automatically at startup by default, so a rollback may require restoring the backup rather than simply starting the old image. Rehearse the rollback in staging and record the elapsed steps. Done means the rollback steps are written, rehearsed once, and linked from the change record before production promotion starts.

Which patch path fits which Keycloak deployment

This table compares four ways to receive and apply Keycloak fixes, showing who controls upgrade timing, where each path fits and what your team must test before rollout. Read it by matching your deployment model to a row, then checking the test column before you commit to a cadence. The main takeaway is that the path you choose sets who decides when a patch lands, so that decision should be explicit before an advisory arrives.

Patch pathWho controls upgrade timingFitWhat you must test
Community release via container imageYour team, by pulling and redeploying the image tag you chooseTeams with in-house platform engineering that want direct control over versions and can run their own release checksLogin, token issuance, custom providers and themes on the new image, plus database migration in a staging copy of production data
Keycloak Operator with manual approval modeYour team approves each operator update; the docs strongly recommend this mode to avoid unintended automatic upgradesKubernetes estates that want declarative management while keeping upgrade decisions under change controlOperator-managed Keycloak custom resources after approval, realm imports, client definitions and any rollout behavior your cluster applies
Red Hat build of Keycloak with subscription channelShared between your team and Red Hat, according to the channel and support terms you holdOrganizations that need a vendor-supported distribution and support commitments for productionCompatibility of your configuration with the Red Hat build version you run, and any differences from upstream behavior you rely on
Self-built image with custom providersYour team, because every rebuild also rebuilds your providers and themes against the new baseDeployments with custom SPI providers, extensions or themed pages that must ship together with the serverProvider and theme compilation against each new release, plus regression tests for every custom authentication flow

Judging whether a Keycloak CVE affects your configuration

The public login, authorization and token endpoints are the surface most internet-facing Keycloak deployments expose by design. When an advisory describes a flaw in authentication, token issuance, redirect handling or session logic, these endpoints are usually the first place it can be reached without credentials. Start by confirming which hostname and paths serve them and whether any of your clients accept a broad range of redirect URIs or web origins, since those settings change what an attacker can do with a flaw in the flow.

  • Reachability: Confirm that the frontend hostname is served through your reverse proxy and that the affected path is actually routed to Keycloak.
  • Client configuration: Note which clients use wildcard redirect URIs or broad web origins, because they widen the effect of many redirect and token flaws.
  • Flow types: Record which grant types and login flows are enabled, such as password grants or direct access, since an advisory may only apply to one of them.
  • Custom front ends: Check whether a proxy or gateway already blocks paths the advisory names, and whether that rule is tested rather than assumed.
  • Protocol versions: Identify whether deprecated or disabled flows still answer on the public hostname.

For each advisory, check the affected endpoint against your proxy routes and client list, then write down whether the vulnerable flow is reachable from the internet.

Patching Keycloak without an outage

A patch upgrade without downtime depends on two things: how the database schema changes during startup, and whether your Keycloak nodes can be restarted one at a time while the rest keep serving logins. Keycloak migrates its database schema automatically at startup by default. That is convenient for a single node, but on a cluster it means the first upgraded node changes the schema while older nodes are still running. For large deployments, the upgrading guide suggests applying the migration SQL manually before any node is replaced, so the schema change is reviewed, timed and reversible on its own terms. Decide which approach you will use before the maintenance window, and confirm with the documentation for your exact target version which schema changes it contains.

Rolling updates across a clustered deployment depend on the high availability architecture you run. Keycloak documents a single cluster (optionally spread across availability zones), multi-cluster deployments (v2) without an external Infinispan cluster, and the deprecated multi-cluster v1 that used a separate Infinispan cluster per site. Both supported designs need a synchronously replicated database. Check that your nodes can run mixed versions for the length of the rollout, and that your load balancer drains a node before it is stopped. If you run v1, plan the move to the stateless multi-site feature as a separate project; the 26.8 upgrade notes recommend it, and it changes what a rolling update can safely do.

Before any production rollout to 26.8, read the upgrade notes for every minor release between your current version and the target, because several defaults changed. The 26.8 notes enforce SMTP StartTLS without plaintext fallback, make signature validation of backchannel logout tokens from external providers mandatory, and persist login failures to the database by default. Each can break a working setup: mail relays without STARTTLS stop sending, external logout notifications may be rejected, and the extra writes can change database load. Rehearse the full upgrade on a copy of the production database with the same schema, data volume and identity provider connections, and verify email delivery, backchannel logout, login and token flows and admin access before you touch production.

Tracking dependencies in custom providers and themes

A Keycloak patch or minor upgrade can break more than the server itself. Custom providers, bundled libraries, themes, the base image, the database driver and the Operator each change on their own schedule, so each one needs a recorded version and a rebuild path. Track them together so a security fix does not stall on an incompatible extension.

Custom SPI providers

Custom authenticators, event listeners, user storage providers and protocol mappers are compiled against Keycloak's Java APIs. Record the Keycloak version each JAR was built and tested against, and the source commit it came from. Check the release notes of every target version for changes to the SPI you use before you deploy. Treat a provider that compiles but was never tested on the new version as unverified. Each provider should also have its own owner and a rebuild step in your pipeline.

Upgrading guide

Bundled third-party libraries

Providers often pull in their own libraries, such as HTTP clients, JSON parsers, LDAP or SAML helpers. These can carry their own advisories that Keycloak's release does not fix. Keep a dependency manifest for every provider with exact versions, and run a software composition scan against it on a schedule. Shade or exclude a library only when you record why, because a copy that conflicts with the one Keycloak ships can fail at runtime in ways that look like authentication errors.

Themes and templates

Login, account and email themes are FreeMarker templates, static resources and message bundles that depend on the page structure and variables of a specific Keycloak release. Record the theme version alongside the Keycloak version it was tested on, and retest login, registration, password reset, consent and error pages after each upgrade. Review any JavaScript or third-party script a theme loads, because it runs in the login page where credentials are entered.

Container base image and JDK

If you build a custom Keycloak image, the base image and the Java runtime it includes are dependencies too. Pin the image by digest in your build, record the tag and digest used for each environment, and rebuild on a schedule so operating system packages receive fixes even when Keycloak itself has not changed. Confirm with the image publisher which Java version each Keycloak release runs on, since the JDK version can affect which providers load.

Database driver

The JDBC driver connects Keycloak to PostgreSQL, MySQL, MariaDB, SQL Server, Oracle or another supported database. Keycloak supports a defined range of database versions, so check the database guide for the release you target and confirm that your database engine version is in range before you move. Record the driver version separately from the database server version, because a driver upgrade can change connection and TLS behavior independently of the database.

Database guide

Keycloak Operator version

If you run Keycloak on Kubernetes, the Operator manages the Keycloak custom resources and rolls out the server version. The Operator documentation strongly recommends manual approval mode for operator updates, so an operator upgrade does not change your Keycloak version without a review. Record the Operator version, the Keycloak image it deploys, and any custom resource fields you use. Confirm in the Operator documentation which fields changed before you approve an update.

Operator installation

Questions teams ask before patching Keycloak

What drives the effort of a Keycloak patch cycle?

The effort follows the size and shape of your deployment, not the patch number alone. The main drivers are the number of realms, the custom providers and themes you have built, the user federation sources such as LDAP or Active Directory, the database size and how long a migration takes against a copy of it, and whether the server runs as a single node or a cluster. Each realm and client set needs a check after the upgrade, and each custom provider needs to be rebuilt and tested against the new release. Ask any partner to break its plan down by these drivers so you can see where the time goes.

Can our own team patch Keycloak without outside help?

Yes, many teams do. The work needs three things: a staging environment that mirrors production closely enough to test real logins, a written runbook that covers backup, upgrade, rollback and verification steps, and a named owner who can approve each change. Your team should also read the upgrade notes for every release between the current and target version, since minor releases can include changes that are opt-in and some settings change defaults. If any of those three pieces is missing, that gap is the usual reason to bring in a partner.

How long does a Keycloak security patch take?

The duration depends on the scope of the upgrade, the amount of testing your applications need and how quickly your change approval process moves, so no fixed figure applies to every environment. Ask for a plan that lists each phase, the test cases, the change windows and the person who signs off at each step. A plan that cannot name its test scope or its rollback point is not ready to schedule. Your own change calendar will often set the real pace more than the technical work does.

What do we need to provide for a patch engagement?

Plan to provide access to a staging environment with the same authentication flows as production, a recent copy of the database for migration testing, and the change approval path for production windows. You will also need an owner for each client application who can confirm that sign-in, token refresh and logout still work after the upgrade. Give the team the list of custom providers, themes, federation sources and identity brokers in use so they can be checked. Missing items on this list usually show up as delays in the test phase.

What does a fixed-scope engagement or retainer usually cover?

A fixed-scope engagement covers a defined set of work agreed in writing before it starts, such as one upgrade from a stated version to a stated version, with named deliverables and a timeline. A retainer covers ongoing work over a period, such as tracking advisories, planning and testing patch releases, upgrading on a schedule and running continuous security testing. Both should state which environments are in scope, who approves changes, how rollback is handled and what documentation is delivered. DeployOpen does not publish a price list, so ask for a quote that follows from the written scope.

Which parts of a patch cycle recur and which are one-time?

The first upgrade usually carries one-time costs: building the staging environment, writing the runbook, testing custom providers and documenting the results. Later cycles reuse most of that work, so the recurring cost is the monitoring of advisories, the test run for each release and the change approval. Ask a partner which parts are one-time and which recur, and whether a retainer includes the test suite and runbook updates. This split helps you compare an in-house plan with an outside one over several years.

Does patching Keycloak require downtime?

It depends on your architecture and on whether the release changes the database schema. Keycloak can migrate its database schema automatically at startup, and it also supports manual migration where administrators apply the SQL themselves, which the upgrading guide suggests for large deployments. Clustered deployments need the database to be synchronously replicated in supported designs. Confirm the rolling update steps for your topology against the upgrade guide and test them in staging before you commit to a no-downtime window.

Should we install the Keycloak Operator update automatically?

Most teams should not. The Keycloak Operator documentation strongly recommends manual approval mode for operator updates to avoid unintended automatic upgrades. With manual approval, each upgrade is planned, tested in staging and approved through your change process before it reaches production. Automatic updates can move a production server to a new release without the testing your applications need, so configure the approval mode as part of your patch runbook.

How an advisory moves through triage, test and rollout

The path starts when a Keycloak advisory is published and first asks whether your version and configuration are affected. Unaffected deployments record that decision and wait for the next scheduled release. Affected ones move to a staging copy with a database copy, where the schema migration is checked before anything changes in production. Production then receives a rolling upgrade, followed by verification and an evidence record. If verification fails, the branch returns to the previous version, and that rollback path should be rehearsed before it is needed.

Triage, staging test, rolling upgrade and rollback for a Keycloak advisory.

What to confirm in your own environment

Keycloak security patching depends on details of your own deployment that no advisory can state for you. The cards below list what to confirm before you plan an upgrade, judge a CVE, or rely on a vendor's support timing. Each one is a question your team can answer from its own inventory and configuration.

Release line and distribution

Confirm whether you run the upstream Keycloak project or the Red Hat build of Keycloak, and which release line your vendor or project actually patches. Upstream receives its fixes in the current release line, so an older minor version may need a move to a newer one to get a fix. The Red Hat build follows its own product cycle, and its product page showed version 26.6 as the latest at the time of the supplied research, so check the current version there before you plan. Write down the exact version each production cluster runs.

Red Hat build page

Database engine and version

Check that your database engine and major version appear in the supported list for your Keycloak release. The supported production list includes PostgreSQL 14 to 18, along with MariaDB, MySQL, Microsoft SQL Server, Oracle Database, EnterpriseDB Advanced, Amazon Aurora PostgreSQL and Azure SQL. A database outside the list can turn a routine patch into a support question. The development file database is not an option for production.

Keycloak database guide

High availability architecture

Confirm which of the documented high availability designs you run, and whether it allows rolling updates without a full outage. Both supported designs require a synchronously replicated database, so verify that replication and failover work before you rely on them during a patch window. Multi-cluster v1 is deprecated, and the 26.8 notes recommend moving from multi-site to the stateless feature. Plan each node restart and schema change against your topology.

High availability overview

Custom provider compatibility

List every custom SPI provider, theme, authenticator and event listener you have deployed, along with the Keycloak version each was built and tested against. Keycloak extensions use internal APIs that can change between releases, and a provider that loads at startup can still fail on a login path. Track the third-party libraries those providers bundle, because a CVE in a library can require a rebuild even when Keycloak itself is unchanged. Retest each extension on the target version before upgrading production.

Operator update approval mode

If you deploy with the Keycloak Operator, confirm whether operator updates install automatically or wait for approval. The Operator documentation strongly recommends manual approval mode to avoid unintended automatic upgrades. Check the subscription settings in Operator Lifecycle Manager and record who approves each change. A security patch then becomes a reviewed change with a known target version rather than something that arrives overnight.

Operator installation guide

Support terms and subscription timing

Ask whether a Red Hat subscription, or any other support contract, changes when you receive fixes and which versions the vendor will patch. Compare the vendor's support terms with the upstream release cadence, since the project plans four minor releases a year. Ask your provider how a fix reaches your version and how quickly it is applied in your environment. Record the answers in your patch policy so the timing is known before an advisory is published.

How DeployOpen approaches Keycloak patching

DeployOpen starts a Keycloak patch program by agreeing its scope in writing before any work begins. The scope names the Keycloak version and distribution in use, whether it is the upstream project or the Red Hat build of Keycloak, the environments covered (development, staging and production), and who watches the advisory channels and how fast a finding moves from triage to a change window. Because most engagements are fixed-scope, the written agreement also states the deliverables, such as a monitoring runbook, an upgrade plan per release line and a retest after each fix. Ask any partner to put these items in writing, including who is responsible for deciding whether a patch is applied when a fix lands between planned upgrade windows.

Upgrades are planned and tested inside the client's own infrastructure, using a staging copy that mirrors the production database engine, cluster layout and custom providers. The plan records which release line receives the fix, whether the Operator is set to manual approval mode, and whether schema migration runs automatically at startup or is applied as SQL by the administrator. Custom SPI providers, themes and client policies are rebuilt and retested against the target version, and the documentation for the admin, rollback and dependency inventory is updated at the same time. Security testing then checks the patched instance, and DeployOpen retests each fix before the change is closed. Ongoing support, upgrades and continuous testing are available as retainers, so the same people who built the patch process can keep running it.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.