Skip to content

[CVE-2026-15943] OIDC identity provider update reuses masked client secret after token URL changes #50945

Closed

Description

@ahus1

CVE-2026-15943: A vulnerability was identified in Keycloak's admin API where the secret masking boundary is bypassed for OIDC identity-provider client secrets. The flaw exists in the IdentityProviderResource.updateIdpFromRep() function. When a PUT request is made to update an IdP configuration and the clientSecret is set to the masked sentinel value (ComponentRepresentation.SECRET_VALUE), Keycloak unconditionally copies the actual stored secret into the update.
The root cause is a lack of validation to check if security-sensitive destination fields—specifically tokenUrl, clientId, or clientAuthMethod—have been modified in the same request. A delegated IdP manager with manage-identity-providers permissions can exploit this by changing the tokenUrl to an attacker-controlled endpoint while providing the masked secret sentinel. Keycloak will then bind the real secret to the new, malicious endpoint, allowing the attacker to capture the secret through normal broker traffic.(update with upstream content)


This issue was originally tracked in the private repository. Migrated by @ahus1.

Activity

  1. added
    priority/important
    area/identity-brokering
    kind/cve
    on Jul 16, 2026
  2. added theissue type on Jul 16, 2026
  3. pedroigor commented on Jul 29, 2026

    @pedroigor
    Contributor

    I'm not sure if this one is really a CVE but I guess it makes no sense to discuss that now. I do not see any comment from core-iam team in regards to this one as well.

    The issue is really about a delegated admin with access to manage brokers, not only to change config but also add mappers, to "steal" credentials by poisoning the broker configuration with malicious endpoints. Not sure how realistic this really is.

    We could consider it as a weakness (even an enhancement, IMO).

  4. added
    severity/medium
    on Sep 30, 2026
  5. self-assigned this
    on Oct 1, 2026
  6. added a commit that references this issue on Oct 8, 2026
    2ec0b6d
  7. 5 remaining items

  8. added a commit that references this issue on Oct 9, 2026
    b61694a
  9. added a commit that references this issue on Oct 14, 2026
    9700baf
  10. added 2 commits that reference this issue on Oct 22, 2026
    0866576
    09b5b37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/identity-brokeringkind/cvepriority/importantrelease/26.6.8release/26.8.1release/27.0.0severity/mediumteam/cloud-nativeteam/communityteam/continuous-deliveryteam/core-authnteam/core-clientsteam/core-iamteam/core-protocolsteam/core-sharedteam/production-readiness

Type

Fields

No fields configured for cve.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions