Where
-Infinity
0

Vendor Risk Score

See how keycloak compares to other vendors in security performance

View Risk Score →

Software

keycloak keycloak
112
keycloak keycloak-services
15
keycloak keycloak admin rest api
5
keycloak keycloak admin-ui-ext
2
keycloak org.keycloak.authorization
2
keycloak admin api
1
keycloak authenticator
1
keycloak authorization services
1
keycloak client-side policy enforcer
1
keycloak clientresource (admin services)
1
keycloak clientupdatersourcehostscondition
1
keycloak fine-grained admin permissions v2 (fgap v2)
1
keycloak google identity provider
1
keycloak identity provider (idp) mapper component
1
keycloak keycloak admin api
1
keycloak keycloak admin services (keycloak: keycloak-services)
1
keycloak keycloak authorization services
1
keycloak keycloak authorization services (pathmatcher)
1
keycloak keycloak default-groups rest endpoint and realm representation
1
keycloak keycloak dynamic client registration (dcr)
1
keycloak keycloak fine-grained admin permissions v2 (fgap v2)
1
keycloak keycloak google identity provider (external access-token exchange)
1
keycloak keycloak organization rest api
1
keycloak keycloak policy enforcer
1
keycloak keycloak server
1
keycloak keycloak-admin-ui
1
keycloak keycloak-model-storage-service
1
keycloak keycloak-nodejs-auth-utils
1
keycloak keycloak-policy-enforcer
1
keycloak ldap user federation
1
keycloak oidc broker component
1
keycloak org.keycloak.broker
1
keycloak org.keycloak.protocol.saml
1
keycloak organization management component
1
keycloak protection api matchinguri resolution
1
keycloak rolecontainerresource
1
keycloak secure-client-uris (client policy executor)
1
keycloak secure-client-uris client policy executor
1
keycloak services
1
keycloak uma grant endpoint
1
keycloak-services
1
Severity
9.8
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

It was found that the Keycloak Node.js adapter 2.5 - 3.0 did not handle invalid tokens correctly. An attacker could use this flaw to bypass authentication and gain access to restricted information, or to possibly conduct further attacks.

1 / 2
First published (updated )
Severity
9.8
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N

A flaw was found in the SAML broker component of Keycloak, which is used to manage identity federation and user authentication. The issue occurs because the IdP-initiated Single Sign-On endpoint fails to check if a provider is restricted to account linking only. This allows an attacker with control over a linked upstream identity to bypass login restrictions and gain full access to a local user account.

1 / 2
Source: MITRE
First published (updated )
Severity
8.8
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

A flaw was found in Keycloak. A vulnerability exists in the jwt-authorization-grant flow where the server fails to verify if an Identity Provider (IdP) is enabled before issuing tokens. The issuer lookup mechanism (lookupIdentityProviderFromIssuer) retrieves the IdP configuration but does not filter for isEnabled=false. If an administrator disables an IdP (e.g., due to a compromise or offboarding), an entity possessing that IdP's signing key can still generate valid JWT assertions that Keycloak accepts, resulting in the issuance of valid access tokens.

1 / 2
Source: MITRE
First published (updated )
Severity
8.8
EPSS
0.32%
AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N

A flaw was found in Keycloak. An authenticated user with low privileges can exploit this vulnerability by sending an oversized subjecttoken JSON Web Token (JWT) to the TokenEndpoint. When the token exceeds a 4000-character limit, it is silently dropped, causing the system to fall back to client credentials. This allows the user to gain the permissions of the client's service account, leading to privilege escalation.

First published (updated )
Severity
8.8
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

https://issues.jboss.org/browse/KEYCLOAK-5299

1 / 2
First published (updated )
Severity
8.8
CSRF
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

It was discovered that the org.keycloak.services.resources.SocialResource.callback(String) method implementation lacked CSRF protection. A remote attacker could use this flaw to gain access to a KeyCloak managed accounts or perform other attacks.

1 / 3
Source: Red Hat
First published (updated )
Severity
8.2
EPSS
0.02%
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N

A flaw was found in Keycloak. By setting a verification policy to 'ALL', the trust store certificate verification is skipped, which is unintended.

1 / 3
Source: NVD
First published (updated )
Severity
8.1
EPSS
0.03%
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N

A flaw was found in Keycloak. An authenticated user with the umaprotection role can bypass User-Managed Access (UMA) policy validation. This allows the attacker to include resource identifiers owned by other users in a policy creation request, even if the URL path specifies an attacker-owned resource. Consequently, the attacker gains unauthorized permissions to victim-owned resources, enabling them to obtain a Requesting Party Token (RPT) and access sensitive information or perform unauthorized actions.

1 / 2
Source: MITRE
First published (updated )
Severity
8.1
EPSS
0.31%
AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:N

A flaw was found in Keycloak. The cross-session verification proof is keyed only by (local userId, idpAlias) and is not bound to the upstream identity that was actually verified, so a second upstream account on the same IdP can consume it and get linked to the victim's local account.

First published (updated )
Severity
8.1
EPSS
0.36%
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N

A flaw was found in Keycloak Policy Enforcer. This vulnerability allows any authenticated user to bypass all authorization policies, including role, scope, and User-Managed Access (UMA) permission checks. By including the configured access-denied page path within a request URL, either as a path segment or a query parameter, an attacker can gain unauthorized access to protected resources.

1 / 2
Source: MITRE
First published (updated )
Severity
8.1
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N

A flaw was found in Keycloak. This JWT algorithm confusion vulnerability in the JWT Authorization Grant flow allows an attacker with valid client credentials to bypass signature verification. By forging an assertion, the attacker can create unauthorized access tokens. This enables the attacker to impersonate any federated user linked to the affected Identity Provider, leading to unauthorized access and potential privilege escalation.

1 / 2
Source: MITRE
First published (updated )
Severity
8.1
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N

A flaw was found in Keycloak. When the JSON Web Token (JWT) authorization grant preview feature is enabled and a user account is disabled, Keycloak fails to validate the user’s disabled status during JWT authorization grant processing. A remote attacker with low privileges can exploit this improper access control vulnerability by presenting a valid assertion token from an external identity provider to obtain a JWT for a disabled user. This allows unauthorized access to sensitive resources.

1 / 2
Source: MITRE
First published (updated )
Severity
8.1
AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N

A Missing Authorization vulnerability was identified in Keycloak Google Identity Provider implementation. The flaw exists in the external access-token exchange code path, which is used when the Token Exchange V1 feature is enabled. While the standard Google ID-token login flow correctly validates the hd hosted domain claim against the configured hostedDomain setting, the access-token exchange flow skips this validation. When an external access token is provided, Keycloak retrieves the user profile from the Google user-info endpoint but fails to verify that the domain associated with the user matches the restricted domain configured in the Identity Provider settings. An attacker with a valid Google access token for any domain can exploit this flaw if they have access to a confidential client authorized to perform token exchange. Successful exploitation allows the attacker to bypass domain restrictions, obtain a Keycloak access token, and potentially create or link a brokered identity that should have been restricted.

1 / 2
Source: Red Hat
First published (updated )
Severity
8.1
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N

A flaw was found in Keycloak's Authorization Services. The component responsible for matching request paths to security policies (PathMatcher) does not properly normalize URIs before comparison. By adding extra characters like a trailing slash or matrix parameters to a URL, an attacker can trick the system into applying a less restrictive security policy than intended. This allows an authenticated user to access administrative or restricted areas they should not have permission to see.

1 / 2
Source: MITRE
First published (updated )
Severity
8.1
AV:A/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N

A flaw was found in the SAML broker component of Keycloak, an identity and access management solution. When configured as a SAML broker using the IdP-Initiated flow, Keycloak fails to enforce the OneTimeUse condition in SAML assertions. This allows an attacker who captures a valid, unused assertion to replay it multiple times. Successful exploitation could allow an attacker to hijack a user's session and gain unauthorized access to the system as that user.

First published (updated )
Severity
7.7
AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:L

A flaw was found in Keycloak. Keycloak's Security Assertion Markup Language (SAML) broker endpoint does not properly validate encrypted assertions when the overall SAML response is not signed. An attacker with a valid signed SAML assertion can exploit this by crafting a malicious SAML response. This allows the attacker to inject an encrypted assertion for an arbitrary principal, leading to unauthorized access and potential information disclosure.

1 / 3
Source: GitHub
First published (updated )
Severity
7.7
EPSS
0.29%
AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:N

A flaw was found in Keycloak. A missing authorization check in the GroupResource.addChild() endpoint within the Admin REST API allows an authenticated user with limited administrative privileges to reparent any existing group. When Fine-Grained Admin Permissions v2 (FGAPv2) is enabled, an attacker with management rights over a single low-privilege group can reparent a highly privileged group (such as one possessing the realm-admin role) under their managed group.

Because group permissions follow a hierarchical structure, this action unauthorizedly grants the attacker management and password-reset capabilities over the members of the targeted privileged group. An attacker can exploit this to reset an administrator's password, compromise the account, and achieve a full realm takeover, leading to a complete compromise of confidentiality, integrity, and availability.

First published (updated )
Severity
7.5
EPSS
0.09%
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

A flaw was found in Keycloak. An unauthenticated attacker can exploit this vulnerability by sending a specially crafted POST request with an excessively long scope parameter to the OpenID Connect (OIDC) token endpoint. This leads to high resource consumption and prolonged processing times, ultimately resulting in a Denial of Service (DoS) for the Keycloak server.

1 / 2
Source: MITRE
First published (updated )
Severity
7.5
EPSS
0.04%
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

A flaw was found in Keycloak. A remote, unauthenticated attacker can send a specially crafted XML input to the Security Assertion Markup Language (SAML) endpoint. This malicious input can cause high CPU usage and worker thread starvation, leading to a Denial of Service (DoS) where the server becomes unavailable.

First published (updated )
Severity
7.5
EPSS
0.16%
AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N

A flaw was found in Keycloak. When a JSON Web Encryption (JWE) encrypted request object is submitted, Keycloak may incorrectly process unsigned claims if the decrypted content is raw JSON, bypassing the configured signature policy. This allows a remote attacker to submit unauthorized claims, leading to a compromise of data integrity within the OpenID Connect (OIDC) authorization flow. While a redirect URI allowlist acts as a compensating control, this vulnerability violates OIDC Core and Financial-grade API (FAPI) signing requirements.

First published (updated )
Severity
7.5
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

It was discovered that by requesting a large enough image size for a generated QR code, a remote attacker could cause uncontrolled resource consumption leading to denial of service for legitimate users.

Upstream Issue:

https://issues.jboss.org/browse/KEYCLOAK-699

1 / 2
Source: Red Hat
First published (updated )
Severity
7.5
CSRF
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

It was found that the cookie used for CSRF prevention in Keycloak was not unique to each session. An attacker could use this flaw to gain access to an authenticated user session, leading to possible information disclosure or further attacks.

1 / 2
First published (updated )
Severity
7.3
EPSS
0.03%
AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N

A flaw was found in Keycloak. This issue allows an attacker, who controls another path on the same web server, to bypass the allowed path in redirect Uniform Resource Identifiers (URIs) that use a wildcard. A successful attack may lead to the theft of an access token, resulting in information disclosure.

1 / 2
Source: MITRE
First published (updated )
Severity
7.3
EPSS
0.35%
AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:N

Description A flaw was found in Keycloak's Fine-Grained Admin Permissions (FGAPv2) feature. An administrator with limited client management permissions can exploit this vulnerability to assign any realm role, including highly privileged roles, to a client's scope mapping. This bypasses intended security controls, allowing the injected role to be projected into a user's authentication token when they access the modified client. This could lead to unauthorized privilege escalation within the Keycloak realm.

1 / 3
Source: GitHub
First published (updated )
Severity
7.3
EPSS
0.42%
XSS
AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N

A flaw was found in Keycloak. A remote attacker with administrative privileges, specifically those with manage-client permission or access to client registration endpoints, could bypass client Uniform Resource Identifier (URI) validation. This is achieved by registering a malicious client with a specially crafted redirect URI using a case-insensitive javascript: or data: scheme. This Cross-Site Scripting (XSS) vulnerability allows for arbitrary code execution in the Keycloak origin when a victim clicks the crafted link, such as in the logout flow or the Admin Console.

First published (updated )
Severity
7.2
AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H

A Broken Access Control vulnerability was identified in Keycloaks Fine-Grained Admin Permissions V2 (FGAP V2) implementation. The flaw exists in the POST /admin/realms/{realm}/users endpoint, where the server fails to validate group membership permissions within the user creation payload. While Keycloak correctly enforces manage-membership scopes for existing users, it misses this check during the initial user creation process. A sub-administrator with user create scope but restricted group manage-membership scope can successfully assign a new user to unauthorized groups by including them in the creation request. Concrete impact: An attacker with sub-admin privileges can elevate the permissions of new users, grant them access to restricted data by placing them in sensitive groups, and bypass the security boundaries established by FGAP V2.

1 / 2
Source: Red Hat
First published (updated )
Severity
7.1
EPSS
0.01%
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N

A flaw was found in Keycloak. A low-privilege user, with knowledge of user credentials and client ID, can bypass a security control intended to disable the implicit flow in OpenID Connect (OIDC) clients. By manipulating client data during a session restart, an attacker can obtain an access token that should not be available. This vulnerability can also lead to the exposure of these access tokens in server logs, proxy logs, and HTTP Referrer headers, resulting in sensitive information disclosure.

First published (updated )
Severity
7

A flaw was found in Keycloak. A remote, unauthenticated attacker can send a specially crafted XML input to the Security Assertion Markup Language (SAML) endpoint. This malicious input can cause high CPU usage and worker thread starvation, leading to a Denial of Service (DoS) where the server becomes unavailable.

First published (updated )
Severity
7

Summary

Under FGAPv2, the ScopeMappedResource and ScopeMappedClientResource write endpoints (add and delete scope mappings) do not call requireMapClientScope per role. An admin holding only fine-grained manage on a single client can attach any realm role — including realm-admin — to that client's scope mapping, bypassing the MAPROLECLIENTSCOPE permission boundary. When a privileged user subsequently authenticates through the modified client, the injected role is projected into the issued token.

Requirements to exploit

FGAPv2 enabled on the realm (adminPermissionsEnabled=true)

Attacker holds fine-grained manage permission on at least one client

A user holding the targeted role (e.g. realm-admin) must authenticate through the modified client

Component affected: org.keycloak.services.resources.admin

Version affected: All versions with FGAPv2 support

Patch available: no

File issue trackers? Yes

CVSS: CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:N (7.3 High)

Embargo: no

Acknowledgement:

Andrej Tomci

Github - @andrejtomci

Steps to reproduce

1. Enable FGAPv2 on the realm (adminPermissionsEnabled=true) 2. Create a delegated admin with fine-grained manage on a single client — no global manage-clients, no MAPROLECLIENTSCOPE on any privileged role 3. As the delegated admin, call POST /admin/realms/{r}/clients/{uuid}/scope-mappings/realm with realm-admin in the roles body — the request succeeds despite no MAPROLECLIENTSCOPE permission 4. Optionally flip fullScopeAllowed=true on the client via PUT /admin/realms/{r}/clients/{uuid} 5. Authenticate as a user holding realm-admin through the modified client 6. Inspect the issued token — realm-admin is projected into the token via the injected scope mapping

First published (updated )
Severity
7

Privilege escalation in Keycloak via POST /admin/realms/{realm}/partialImport. The endpoint bypasses Fine-Grained Admin Permissions (FGAP) -- it only checks requireManageRealm() but not per-resource-type permissions. A limited admin with only manage-realm can escalate to full realm admin by importing users with realm-admin role mappings. Verified on Keycloak 26.6.1.

Related: GitHub issue #9387 describes this as hardening, but it is an exploitable privilege escalation.

1 / 2
Source: Red Hat
First published (updated )

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203