VYPR
Moderate severityNVD Advisory· Published Mar 27, 2023· Updated Feb 24, 2025

CVE-2022-2237

CVE-2022-2237

Description

A flaw was found in the Keycloak Node.js Adapter. This flaw allows an attacker to benefit from an Open Redirect vulnerability in the checkSso function.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
keycloak-connectnpm
< 21.0.121.0.1

Affected products

1

Patches

1
190a9470e234

Prevent open redirect when checking SSO

1 file changed · +2 1
  • middleware/check-sso.js+2 1 modified
    @@ -61,7 +61,8 @@ module.exports = function (keycloak) {
           delete urlParts.query.auth_callback
           delete urlParts.query.state
     
    -      const cleanUrl = URL.format(urlParts)
    +      // Collapse leading slashes to a single slash to prevent open redirects
    +      const cleanUrl = URL.format(urlParts).replace(/^\/+/, '/')
     
           //  Check SSO process is completed
           request.session.auth_is_check_sso_complete = true
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

5

News mentions

0

No linked articles in our index yet.