CVE-2023-6787: Keycloak: session hijacking via re-authentication
Noroxi assessment
Priority: Monitor (action score 35/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 0.74% (FIRST EPSS); higher than 54.7% of all records.
- Anyone who can reach it over the internet can trigger it. No account or password is required. A user must open a link or visit a page. No special conditions are required; it is repeatable.
- Fixed version: github.com/keycloak/keycloak keycloak 22.0.10, 24.0.3.
- Severity is disputed: the assigning authority (CNA) scores it 6.5, NVD 8.8.
Low priority for now. Upgrade to github.com/keycloak/keycloak keycloak 22.0.10, 24.0.3 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
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.
- Published
- Apr 25, 2024
- Updated
- Jun 17, 2026
- EPSS
- 0.7% · 54th percentile
- CWE
- CWE-287
Report tools
Action score
35
Monitor
Low priority for now.
- CVSS
- 35 / 40 · 8.8 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.7%
CISA SSVC decision
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- 8.8
- CNA · redhat
- 6.5
- 2.3 point gap
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Running WordPress? Scan your site free with WP Lens
Noroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| redhat | build of keycloak | cpe:2.3:a:redhat:build_of_keycloak |
| redhat | keycloak | cpe:2.3:a:redhat:keycloak |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- redhat build of keycloakall versions
- redhat keycloakbefore 22.0.10
- redhat keycloak23.0.0 and later · before 24.0.3
Versions reported by the vendor
Affected version ranges reported by the assigning authority (redhat). Independent of NVD's CPE analysis and usually ahead of it.
github.com/keycloak/keycloak keycloak
- before 22.0.10affected · semver
- before 24.0.3affected · semver
Red Hat Red Hat build of Keycloak 22
- 22.0.10-1 and laternot affected · rpm
- 22-13 and laternot affected · rpm
- 22-16 and laternot affected · rpm
Red Hat Red Hat build of Keycloak 22.0.10
- all versionsunknown
Red Hat Red Hat Single Sign-On 7
- all versionsaffected
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Maven | org.keycloak:keycloak-services | from 23.0.0 · before 24.0.3 | 24.0.3 |
| Maven | org.keycloak:keycloak-services | before 22.0.10 | 22.0.10 |
Same product
redhat: all recordsOther highest-scoring records for the same primary product.
- CVE-2026-16442Keycloak-services: keycloak-services: saml idp-initiated broker login bypasses link-only restriction39Monitor
- CVE-2026-16443Keycloak-services: keycloak-services: saml broker metadata import disables response signature validation36Monitor
- CVE-2026-15572Keycloak-services: keycloak-services: dcr protocol mapper type-swap policy bypass allows privilege escalation35Monitor
Published before and after this one in the same product
- ← EarlierCVE-2024-1132Apr 17, 2024 · Keycloak: path transversal in redirection validation32Monitor
- Later →CVE-2024-7260Sep 9, 2024 · Keycloak-core: open redirect on account page24Monitor
- Later →CVE-2024-7318Sep 9, 2024 · Keycloak-core: one time passcode (otp) is valid longer than expiration timeseverity19Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| github.com/keycloak/keycloak keycloak | 22.0.10 | Vendor (CNA) |
| github.com/keycloak/keycloak keycloak | 24.0.3 | Vendor (CNA) |
| Maven:org.keycloak:keycloak-services | 22.0.10 | Package registry (OSV) |
| Maven:org.keycloak:keycloak-services | 24.0.3 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
No history yet (it accumulates with the daily EPSS job).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
No commit or PR link among the references.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
- CVE-2025-3910369 days apartOrg.keycloak.authentication: two factor authentication bypass21Monitor
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- A user must open a link or visit a page.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-287 · Improper AuthenticationCVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
nvd-primary
Root cause
Authentication is added route by route instead of being enforced in one place. When a route added later bypasses the shared middleware, the session check never runs for it.
The bug in code
The whole CWE-287 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
app.use("/admin", requireSession, adminRouter);
// Route added later skips the middleware
app.post("/admin-api/config", updateConfig);Fixed
const admin = express.Router();
admin.use(requireSession, requireRole("admin"));
admin.post("/config", updateConfig);
app.use("/admin", admin);Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- Authentication AbuseCAPEC-114Medium
- Authentication BypassCAPEC-115Medium
- Identity SpoofingCAPEC-151likelihood: Medium · Medium
- Fake the Source of DataCAPEC-194Medium
- Exploiting Trust in ClientCAPEC-22likelihood: High · High
- Utilizing REST's Trust in the System Resource to Obtain Sensitive DataCAPEC-57likelihood: Medium · Very High
- Session HijackingCAPEC-593likelihood: High · Very High
- Token ImpersonationCAPEC-633Medium
ATT&CK techniques
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (4 more)Show less
Vendor advisories and official records. Exploit/PoC links are deliberately left out.