Skip to content

[CVE-2026-16108] Realm default-group reads disclose hidden groups und… - #51090

Merged
pedroigor merged 1 commit into
keycloak:mainfrom
martin-kanis:issue-51001
Jul 27, 2026
Merged

[CVE-2026-16108] Realm default-group reads disclose hidden groups und…#51090
pedroigor merged 1 commit into
keycloak:mainfrom
martin-kanis:issue-51001

Conversation

@martin-kanis

Copy link
Copy Markdown
Contributor

…er FGAP v2

Closes #51001

Copilot AI review requested due to automatic review settings July 22, 2026 12:28
@martin-kanis
martin-kanis requested a review from a team as a code owner July 22, 2026 12:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes CVE-2026-16108 by preventing delegated administrators from discovering default groups they cannot view.

Changes:

  • Filters default groups using FGAP group-view permissions.
  • Applies filtering to realm details, realm listings, and the default-groups endpoint.
  • Adds integration coverage for denied and granted access.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
RealmAdminResource.java Filters default groups in realm details and endpoint responses.
RealmsAdminResource.java Filters default groups in realm listings.
GroupResourceTypeFilteringTest.java Tests hidden and explicitly permitted default groups.

@pedroigor pedroigor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only concern I have is that we are building group paths twice. We can improve that as a follow-up.

@keycloak-github-bot keycloak-github-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unreported flaky test detected, please review

@keycloak-github-bot

Copy link
Copy Markdown

Unreported flaky test detected

If the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR.

org.keycloak.testsuite.oauth.ClientAuthPostMethodTest#testPostAuthenticationNotAllowedWhenBasicRequested

Keycloak CI - Base IT (6)

java.lang.NullPointerException: Cannot read field "features" because the return value of "org.keycloak.common.Profile.getInstance()" is null
	at org.keycloak.common.Profile.isFeatureEnabled(Profile.java:534)
	at org.keycloak.protocol.oidc.OIDCClientSecretConfigWrapper.<init>(OIDCClientSecretConfigWrapper.java:41)
	at org.keycloak.protocol.oidc.OIDCClientSecretConfigWrapper.fromClientRepresentation(OIDCClientSecretConfigWrapper.java:49)
	at org.keycloak.testsuite.oauth.ClientAuthPostMethodTest.testPostAuthenticationNotAllowedWhenBasicRequested(ClientAuthPostMethodTest.java:141)
...

Report flaky test

org.keycloak.testsuite.oauth.ClientAuthPostMethodTest#testBasicAuthenticationNotAllowedWhenPostRequested

Keycloak CI - Base IT (6)

java.lang.NullPointerException: Cannot read field "features" because the return value of "org.keycloak.common.Profile.getInstance()" is null
	at org.keycloak.common.Profile.isFeatureEnabled(Profile.java:534)
	at org.keycloak.protocol.oidc.OIDCClientSecretConfigWrapper.<init>(OIDCClientSecretConfigWrapper.java:41)
	at org.keycloak.protocol.oidc.OIDCClientSecretConfigWrapper.fromClientRepresentation(OIDCClientSecretConfigWrapper.java:49)
	at org.keycloak.testsuite.oauth.ClientAuthPostMethodTest.testBasicAuthenticationNotAllowedWhenPostRequested(ClientAuthPostMethodTest.java:112)
...

Report flaky test

…er FGAP v2

Closes keycloak#51001

Signed-off-by: Martin Kanis <mkanis@ibm.com>
Copilot AI review requested due to automatic review settings July 27, 2026 18:33
@pedroigor
pedroigor enabled auto-merge (rebase) July 27, 2026 18:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@pedroigor
pedroigor merged commit 073d2e8 into keycloak:main Jul 27, 2026
91 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CVE-2026-16108] Realm default-group reads disclose hidden groups under FGAP v2

4 participants