CVE-2023-6787

MEDIUM
Published Apr 25, 2024 Modified Jun 30, 2025 CWE-287

Description

A flaw was found in Keycloak that occurs from an error in the re-authentication mechanism within org.keycloak.authentication. This flaw allows hijacking an active Keycloak session by triggering a new authentication process with the query parameter "prompt=login," prompting the user to re-enter their credentials. If the user cancels this re-authentication by selecting "Restart login," an account takeover may occur, as the new session, with a different SUB, will possess the same SID as the previous session.

Is your site exposed to CVE-2023-6787?

Run a free security scan — no signup, results in seconds.

CVSS v3.1 Score

6.5
MEDIUM
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N

Weakness Type (CWE)

CWE-287 Improper Authentication

Affected Products

Vendor Product
redhat build_of_keycloak
redhat keycloak
redhat keycloak

References

Frequently Asked Questions

What is CVE-2023-6787? +
A flaw was found in Keycloak that occurs from an error in the re-authentication mechanism within org.keycloak.authentication. This flaw allows hijacking an active Keycloak session by triggering a new authentication process with the query parameter "prompt=login," prompting the user to re-enter their credentials. If the user cancels this re-authentication by selecting "Restart login," an account takeover may occur, as the new session, with a different SUB, will possess the same SID as the previous session. It has a CVSS v3.1 base score of 6.5 (MEDIUM).
How severe is CVE-2023-6787? +
CVE-2023-6787 has a CVSS v3.1 score of 6.5 out of 10, rated MEDIUM. This is a medium-severity vulnerability that should be remediated as part of regular maintenance.
What products are affected by CVE-2023-6787? +
CVE-2023-6787 affects products from redhat, specifically: build_of_keycloak, keycloak. Check the affected products table above for specific version ranges.
How do I check if I'm vulnerable to CVE-2023-6787? +
You can use Secably's free Website Scanner to check your website for known vulnerabilities. For infrastructure scanning, use the Port Scanner to identify exposed services that may be affected. Check the vendor advisories linked above for specific patch and version information.

Related Vulnerabilities

Don't wait for an exploit

Scan your website for vulnerabilities like CVE-2023-6787 — free, no signup required.