CVE-2022-2237: keycloak-connect contains Open redirect vulnerability in the Node.js adapter
6.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.25731%
CWE
Published
3/2/2023
Updated
4/4/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
keycloak-connect | npm | < 21.0.1 | 21.0.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The commit diff shows the vulnerability was in the URL formatting logic within check-sso.js. The unpatched code used URL.format(urlParts) to construct redirect URLs, which preserved multiple leading slashes. This allowed relative URLs starting with '//' to bypass security checks and redirect to external domains. The patch explicitly addresses this by adding a regex replacement (replace(/^/+/, '/')) to collapse leading slashes, confirming this was the vulnerable code path. The CWE-601 classification and advisory descriptions directly match this URL validation flaw in the checkSSO flow.