CVE-2023-6236
Description
A flaw was found in Red Hat Enterprise Application Platform 8. When an OIDC app that serves multiple tenants attempts to access the second tenant, it should prompt the user to log in again since the second tenant is secured with a different OIDC configuration. The underlying issue is in OidcSessionTokenStore when determining if a cached token should be used or not. This logic needs to be updated to take into account the new "provider-url" option in addition to the "realm" option.
EAP-7 does not provide the vulnerable provider-url configuration option in its OIDC implementation and is not affected by this flaw.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
org.wildfly.security:wildfly-elytron-http-oidcMaven | < 2.2.5.Final | 2.2.5.Final |
Patches
16e94ec3476a2[JBEAP-26097] CVE-2023-6236: Compare the provider-url for a cached account against the provider-url required for a request to determine if a cached token can be used
3 files changed · +18 −5
http/oidc/src/main/java/org/wildfly/security/http/oidc/OidcCookieTokenStore.java+2 −2 modified@@ -20,6 +20,7 @@ import static org.wildfly.security.http.oidc.ElytronMessages.log; import static org.wildfly.security.http.oidc.Oidc.OIDC_STATE_COOKIE; +import static org.wildfly.security.http.oidc.Oidc.checkCachedAccountMatchesRequest; import java.net.URISyntaxException; import java.util.List; @@ -72,8 +73,7 @@ public boolean isCached(RequestAuthenticator authenticator) { return false; } OidcAccount account = new OidcAccount(principal); - if (deployment.getRealm() != null && ! deployment.getRealm().equals(account.getOidcSecurityContext().getRealm())) { - log.debug("Account in session belongs to a different realm than for this request."); + if (! checkCachedAccountMatchesRequest(account, deployment)) { return false; }
http/oidc/src/main/java/org/wildfly/security/http/oidc/Oidc.java+14 −0 modified@@ -333,4 +333,18 @@ public static void logToken(String name, String token) { } } + protected static boolean checkCachedAccountMatchesRequest(OidcAccount account, OidcClientConfiguration deployment) { + if (deployment.getRealm() != null + && ! deployment.getRealm().equals(account.getOidcSecurityContext().getRealm())) { + log.debug("Account in session belongs to a different realm than for this request."); + return false; + } + if (deployment.getProviderUrl() != null + && ! deployment.getProviderUrl().equals(account.getOidcSecurityContext().getOidcClientConfiguration().getProviderUrl())) { + log.debug("Account in session belongs to a different provider than for this request."); + return false; + } + return true; + } + }
http/oidc/src/main/java/org/wildfly/security/http/oidc/OidcSessionTokenStore.java+2 −3 modified@@ -19,6 +19,7 @@ package org.wildfly.security.http.oidc; import static org.wildfly.security.http.oidc.ElytronMessages.log; +import static org.wildfly.security.http.oidc.Oidc.checkCachedAccountMatchesRequest; import java.util.ArrayList; import java.util.Collection; @@ -88,9 +89,7 @@ public boolean isCached(RequestAuthenticator authenticator) { } OidcClientConfiguration deployment = httpFacade.getOidcClientConfiguration(); - - if (deployment.getRealm() != null && ! deployment.getRealm().equals(account.getOidcSecurityContext().getRealm())) { - log.debug("Account in session belongs to a different realm than for this request."); + if (! checkCachedAccountMatchesRequest(account, deployment)) { return false; }
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
8- github.com/advisories/GHSA-jpmx-996v-48fmghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2023-6236ghsaADVISORY
- access.redhat.com/errata/RHSA-2024:3580nvdWEB
- access.redhat.com/errata/RHSA-2024:3581nvdWEB
- access.redhat.com/errata/RHSA-2024:3583nvdWEB
- access.redhat.com/security/cve/CVE-2023-6236nvdWEB
- bugzilla.redhat.com/show_bug.cginvdWEB
- github.com/wildfly-security/wildfly-elytron/commit/6e94ec3476a279c0a130186209c50a2991ba4c84ghsaWEB
News mentions
0No linked articles in our index yet.