In my November 5 article, I ran the 19 CVEs of Keycloak 26.8.1 through my config. No confirmed exposure. Yet the same lab had turned up two holes I did not publish that day. No bulletin will ever flag them: they live in my settings, not in Keycloak's code.

TL;DR: a CVE is a flaw in their code. A bad setting is a flaw in yours, and nobody will warn you. In my setup, the Ingress that guards the admin console accepted 0.0.0.0/0, so the whole Internet. And my Terraform sends Keycloak's emails without TLS. My two fixes are tests that run in CI, not a checklist.

Source and repository status: snapshot as of November 3, 2026, updated on November 14 for 26.8.2. Check the documentation of your version before changing a setting.

Since my review, 26.8.2 has been released. Keycloak released version 26.8.2 on November 5, the very day of my review. It fixes 33 more flaws that carry a CVE number. Some require no specific option to be enabled. For example, an attacker with no account can fill the server's disk through the theme cache. This affects versions up to 26.8.0 (CVE-2026-110932). So my 26.5.7 is exposed, and the upgrade cannot wait any longer. But none of these fixes closes the two holes in this article.

This article is for teams that run Keycloak themselves, behind a reverse proxy or a Kubernetes Ingress.

A CVE lives in their code. A bad setting lives in yours

A CVE is a public number given to a flaw in a piece of software. When Keycloak fixes 19 of them, everyone hears about it. Scanners light up, Dependabot opens a pull request, and you read the release notes.

A bad setting never gets a number. Nobody publishes an advisory when your IP allow list contains the whole world. No image scanner reads your values.yaml. And your Terraform can declare plaintext SMTP for months without a single tool saying a word.

A CVE gets announced, a bad setting never is

A critical setting without a test is a promise. A CVE comes with a bulletin. My two holes will never get one, so the test in CI plays that part.

In my sort of the 19 CVEs, I looked at their code through my config. Here, I look at my config on its own. It is the other half of the job, and the half that hurt the most.

My lab: one Helm chart, two Ingresses, one Terraform

Keycloak runs on my own Kubernetes platform. It handles login for my Go services. I deploy it with a Helm chart I wrote. An nginx Ingress exposes it.

The chart creates two Ingresses. The first serves the / path: the login page, the realms, the OIDC endpoints. The second only serves /admin, and carries an annotation that limits the allowed IPs.

The realms and clients are described in Terraform. An export of my development realm also sits in the repository. That export is the one I ran through the CVE grid. The link between that realm and my database is the subject of my article on identity drift between Keycloak and the database.

Hole 1: the admin console accepted the whole Internet

Here is the second Ingress, as it sits in the chart:

# Admin Ingress, IP-restricted /admin/ path apiVersion: networking.k8s.io/v1 kind: Ingress metadata: annotations: nginx.ingress.kubernetes.io/whitelist-source-range: {{ join "," .Values.adminIpAllowList | quote }} spec: rules: - http: paths: - path: /admin pathType: Prefix 

The comment says "IP-restricted". The annotation is there. The control exists. Then I open the chart's values.yaml:

adminIpAllowList: - 0.0.0.0/0 

And the production override file repeats the same value. 0.0.0.0/0 is the CIDR notation for every IPv4 address. In other words, the whole Internet. The admin console is protected by the admin password alone.

Keycloak's documentation leaves no room for doubt. Its reverse proxy guide marks /admin/ as "Internal only", with this reason: "Exposed admin paths lead to an unnecessary attack vector". The administration guide adds: "Do not expose administrative endpoints externally if external access is not necessary".

This hole came out of the October 31 lab, while I was building the CVE grid. I kept it out of that article because it had nothing to do with 26.8.1. It has everything to do with me.

Hole 2: SMTP goes out in plaintext, and my code says so

Keycloak sends emails: address verification, forgotten password, magic link. Each one carries a link that opens a session. A reset email read in plaintext on the network is an account taken over.

In my development realm export, the smtpServer block holds four keys: host, port, from and fromDisplayName. No starttls, no ssl, no auth. In development, that is fine: the host is a local mail catcher.

The Terraform that manages my realm is more worrying. Its smtp_server block spells it out:

smtp_server { host = var.smtp_host port = var.smtp_port from = var.smtp_from ssl = false starttls = false } 

No auth block. The production variables point to an external SMTP server, on port 587. That port usually expects StartTLS and a login. With this config, either the emails never leave, or someone fixed the setting by hand in the console. In both cases, the code says something other than production. I still have to check what production really sends.

There is an irony here. CVE-2026-107121, fixed in 26.8.1, hits realms where StartTLS is ticked. Before, Keycloak carried on in plaintext if the server did not offer encryption. Now, sending fails. My grid had marked me "not affected", because StartTLS is not ticked. I was not affected because I had never asked for encryption in the first place.

Why a test beats a checklist

A checklist is read once, on the day you deploy. The "IP-restricted" comment was a box ticked in my head. It ticked nothing in reality.

A test runs on every change. It reads the value, not the comment. And the day someone widens the list "for a day", to debug from a hotel, they break the CI. Rolling back is no longer a matter of memory.

I apply the rule from my article on Go binaries: check what runs, not what is written. The first test reads the rendered chart, what is about to be deployed. The second reads the realm as Keycloak holds it, what runs.

Test 1: render the chart and refuse 0.0.0.0/0

This blog is Go-first, so is the test. helm template renders the chart with the production values. The test looks for the annotation and fails if it contains 0.0.0.0/0, or if it is missing.

func TestAdminIngressIsNotOpenToTheInternet(t *testing.T) { out, err := exec.Command("helm", "template", "keycloak", "./helm", "-f", "releases/prod/values.yaml").Output() if err != nil { t.Fatalf("helm template: %v", err) } const key = "nginx.ingress.kubernetes.io/whitelist-source-range:" found := false for _, line := range strings.Split(string(out), "\n") { _, value, ok := strings.Cut(line, key) if !ok { continue } found = true if strings.Contains(value, "0.0.0.0/0") { t.Fatalf("admin ingress accepts the whole Internet: %s", strings.TrimSpace(value)) } } if !found { t.Fatal("admin ingress has no whitelist-source-range annotation") } } 

The shell version fits in three lines, for a CI step without Go:

ranges=$(helm template keycloak ./helm -f releases/prod/values.yaml | grep 'whitelist-source-range' || true) [ -n "$ranges" ] && ! grep -qF '0.0.0.0/0' <<<"$ranges" \ || { echo "admin ingress open to the Internet"; exit 1; } 

One detail matters. The annotation filters the address nginx sees. Behind a load balancer, that is often the load balancer's address. The ingress-nginx documentation describes the setting: use-forwarded-headers with proxy-real-ip-cidr, or the PROXY protocol. Without it, your list filters the wrong address, and the test stays green.

Test 2: read the realm and require TLS and authentication

Keycloak reads its SMTP config as strings. In its code, DefaultEmailSenderProvider checks "true".equals(config.get("starttls")), and the same for ssl and auth. So the test compares strings, not booleans.

To read the live realm, the command line tool is enough: kcadm.sh get realms/my-realm returns its JSON representation. In CI, you can also read the committed export. But it says nothing about changes made by hand.

func TestRealmSMTPUsesTLSAndAuth(t *testing.T) { raw, err := os.ReadFile("realm-export.json") // or the output of kcadm.sh get realms/my-realm if err != nil { t.Fatal(err) } var realm struct { SMTP map[string]string `json:"smtpServer"` } if err := json.Unmarshal(raw, &realm); err != nil { t.Fatal(err) } if realm.SMTP["starttls"] != "true" && realm.SMTP["ssl"] != "true" { t.Error(`smtpServer: neither starttls nor ssl is "true"`) } if realm.SMTP["auth"] != "true" { t.Error(`smtpServer: auth is not "true"`) } } 

With jq, the same rule fits in one line:

kcadm.sh get realms/my-realm \ | jq -e '.smtpServer | (.starttls == "true" or .ssl == "true") and .auth == "true"' >/dev/null \ || { echo "SMTP without TLS or without auth"; exit 1; } 

I ran the Go test on my development export. It fails on both lines. That is the expected result, and the proof that the test bites.

One precaution for the version that reads the live realm. 26.8.2 also fixes a flaw in kcadm.sh itself. With a custom truststore, it accepted any self-signed certificate (CVE-2026-96453). So use the kcadm.sh from 26.8.2 or later for this test.

The stronger option: a separate hostname for the admin

Keycloak can serve the admin console on another hostname. The option is called hostname-admin, or KC_HOSTNAME_ADMIN as an environment variable. The documentation describes it this way: "Address for accessing the administration console. Use this option if you are exposing the administration console using a reverse proxy on a different address".

With a dedicated name, the public Ingress no longer needs to serve /admin at all. The admin name can exist only in your internal DNS or behind your VPN. The rule becomes easy to read and easy to test.

The same page sets a limit: "Using the hostname-admin option does not prevent accessing the Administration REST API endpoints". The restriction has to happen at the reverse proxy. The separate hostname tidies the console away. The IP list on the proxy stays necessary, and the reverse proxy guide also asks to keep /realms/master/ internal.

What I am changing

None of this is done as I write. Here is the plan, in order.

The checklist

A critical setting without a test is a promise. A test is proof, renewed on every commit.

  • [ ] Render your chart with the production values and search every annotation for 0.0.0.0/0
  • [ ] Check that /admin/ and /realms/master/ are not served by your public Ingress
  • [ ] Make sure your nginx controller sees the real source address
  • [ ] Read smtpServer with kcadm.sh get realms/<realm> and require starttls or ssl, plus auth
  • [ ] Compare what Terraform declares with what Keycloak holds: a difference is a change made by hand
  • [ ] Write every critical setting as a test that can fail, then put it in CI
  • [ ] Look into KC_HOSTNAME_ADMIN for a separate admin hostname

The takeaway

The 19 CVEs of Keycloak 26.8.1 did not affect my config. At least one CVE from 26.8.2 does, and the upgrade has to happen. But my config needed none of them to have holes. No security advisory will ever cover your IP list or your StartTLS checkbox.

For those settings, you are the bulletin. Write it as a test, and let the CI reread it for you.

Want to put your Keycloak config through the same review? See my identity and SSO architecture offer, or let's talk.

Sources: Keycloak, 26.8.1 release post · Keycloak, 26.8.2 release notes · Keycloak, releases on GitHub · Keycloak, reverse proxy guide (paths to expose) · Keycloak, hostname and hostname-admin configuration · Keycloak server administration guide (admin endpoints, email settings, Admin CLI) · Keycloak upgrading guide (26.8.1 StartTLS note) · GitHub advisory, CVE-2026-107121 · Keycloak source, DefaultEmailSenderProvider · Keycloak Terraform provider, keycloak_realm resource · ingress-nginx, whitelist-source-range annotation · ingress-nginx, source IP address