Home/ Blog/ Security news/ Article
Blog · Security news

A Keycloak flaw lets attackers forge a single sign-on login and hijack accounts (CVE-2026-16443)

CVE-2026-16443 is a Keycloak flaw where importing SAML identity-provider metadata can leave signature checks off, letting an attacker forge a login.

A stone gatehouse arch standing open with a cracked wax seal hanging loose

An identity broker has one job you are trusting it to do without watching over its shoulder: prove that a login truly came from the provider it claims. CVE-2026-16443, published by Red Hat on August 5, is a case where Keycloak can quietly stop proving it. Add a SAML identity provider by importing its metadata, and under some conditions Keycloak leaves the response-signature check turned off, even when that metadata shipped a signing certificate. Someone who never logs in, but who knows how your provider names a given user, can then present a self-made login assertion and be waved through as that person.

Keycloak is one of the most widely run open-source single sign-on servers, and the defect lives in keycloak-services, the module that drives identity federation in Keycloak, as shipped in Red Hat Build of Keycloak. Red Hat scores it 7.4 (High) and credits Paul Bottinelli of Trail of Bits. Nothing points to exploitation in the wild so far, and at the time of writing Red Hat lists no fixed errata and no workaround for its build.

What the flaw actually does

Federated single sign-on rests on one switch in Keycloak: Validate Signatures. Turned on, the broker insists that everything a provider sends be signed by the key it already trusts. Turned off, it believes whatever it is handed. The bug is that the import path can save this switch in the off position. It is meant to flip on the instant imported metadata carries a signing certificate. Upstream tracked the miss as issue #42213: the flag was being set only when the metadata also asked for signed outbound requests, an unrelated option. Red Hat pins the trigger instead on keys that arrive without their usage attributes. The effect is one and the same. You import a provider's genuine metadata, you see its certificate, you assume you are covered, and you are not.

What follows is the oldest problem in this protocol. The broker acts on whatever a provider asserts about your identity. Skip the signature and nothing stops an outsider from writing an assertion that names the victim and sending it in. The severity breakdown makes the shape plain: reachable over the network, no credentials and no click required, full impact to confidentiality and integrity, none to availability. The high-complexity rating reflects the two things an attacker has to line up, a provider sitting in the vulnerable state and the target's identifier at that provider. This is a precision account-takeover tool rather than a spray-and-pray bug, and in front of an admin console or a cloud tenant that distinction offers thin comfort.

Why upgrading is not the whole fix

Here is the detail the advisory leaves implicit, and the reason to spend an afternoon on it. The fault is in how the switch gets written during import, not in how a response is judged later. Keycloak maintainers repaired the import path in version 26.4.0, after the behavior surfaced as a regression in 26.3.3.

A known behavior, now a CVEAug 2025: Bug reported. 26.4.0: Upstream fix. Aug 5 2026: CVE assigned.A known behavior, now a CVEAug 2025Bug reported26.4.0Upstream fixAug 5 2026CVE assigned
Sources: Keycloak GitHub issue #42213 (opened August 2025) and Red Hat advisory CVE-2026-16443 (August 5, 2026).

Repairing the code changes what the next import does. It does nothing for a provider you already brought in while running a vulnerable build. That choice is persisted in your configuration, and it sits there untouched by the update. An operator who patches and calls it done can still be running a provider that trusts unsigned logins. Take the upgrade as step one, then go read the actual switch on every provider you have.

How exposed are you

You are in range if you run Keycloak, community or Red Hat build, as a SAML broker, meaning you accept logins from an outside SAML provider rather than only minting your own. The stakes climb with what sits behind that broker: an administrative console, a tenant in the cloud, an internal app that honors the SSO session. One provider left unchecked is a standing door for anyone who can learn a single target's identifier.

What to do this week

  • Audit every SAML provider today. Open each one in the admin console, confirm Validate Signatures is enabled, and confirm a validating certificate is attached. Do this before, and apart from, any upgrade, because the upgrade will not do it for you.
  • Move the broker to a fixed build. Take community Keycloak to 26.4.0 or newer so fresh imports set the flag correctly. For Red Hat Build of Keycloak, watch Red Hat's advisory and apply the fixed errata as soon as it lands.
  • Hunt for abuse. A forged sign-in still writes a brokered-login event to Keycloak's audit trail. Comb authentication events on the affected providers for privileged accounts signing in from odd places, and alert on new brokered sessions for those accounts from here on.

This is the third Keycloak brokering weakness we have written up in recent weeks, next to a domain-restriction bypass and a vault secret exposure. One thread ties them together: the broker is what everything downstream trusts, so a quiet default inside it becomes everyone's problem. The same held when researchers reported that a SAML plugin could let a stranger sign in as WordPress admin. Check the trust boundary you cannot see, because attackers are reading the same advisory you are.

Frequently asked questions

What is CVE-2026-16443?

CVE-2026-16443 is a signature-verification flaw in Keycloak's SAML identity brokering, rated CVSS 7.4. Importing an identity provider's metadata under certain conditions can leave signature validation for SAML responses disabled, letting an unauthenticated attacker forge a login. Red Hat disclosed it on August 5, 2026.

Is CVE-2026-16443 being exploited?

There is no public report of exploitation in the wild and no known proof-of-concept at the time of writing. The flaw carries high attack complexity because it needs a provider left in the vulnerable state and knowledge of the target's external identifier, but the impact is full account takeover.

Does upgrading Keycloak fix CVE-2026-16443?

Upgrading fixes how new imports behave, but not on its own. The vulnerable setting is written at import time and stored in your provider configuration, so a provider imported while vulnerable keeps signature validation off after an upgrade. You must check the setting on every existing provider manually.

Which Keycloak versions are affected?

The upstream project reported the behavior as a regression in Keycloak 26.3.3 and corrected the import logic in 26.4.0. Red Hat lists Red Hat Build of Keycloak as affected in its advisory and, at the time of writing, had not published a fixed errata version or a mitigation.

How do I check if my Keycloak is vulnerable?

In the admin console, open every SAML identity provider and confirm the Validate Signatures option is enabled with a validating certificate set. If it is off on a provider whose metadata included a signing certificate, that provider is trusting unsigned responses and should be corrected immediately.

Ready to meet the Guardians?

Deploys fast - agentless for monitoring and cloud, a lightweight agent for deep endpoint security. Just Suriq, standing watch.