CVE-2023-6291: The redirect_uri validation logic allows for bypassing explicitly allowed hosts that would otherwise be restricted
7.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.42029%
CWE
Published
12/21/2023
Updated
1/26/2024
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
org.keycloak:keycloak-services | maven | < 23.0.3 | 23.0.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from incomplete URI normalization in redirect validation. The commit b2e9110 explicitly fixes this by introducing stripOffRedirectForWildcard()
to remove user-info, query, and fragment components before validation. The original matchesRedirects
function (lines 256-257 in the patch) only handled query parameters, making it vulnerable to authority confusion via encoded user-info payloads like 'www%2ekeycloak%2eorg%2fapp%2f:y@example.com'. The function's failure to sanitize user-info before wildcard comparison directly enabled the validation bypass.