Skip to main content

Keycloak EUVDEUVD-2026-117923

| CVE-2026-97848 MEDIUM
Improper Input Validation (CWE-20)
2026-11-06 secalert@redhat.com GHSA-43w4-wpq4-5p8q
6.5
CVSS 3.1 · Vendor: redhat
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate as low-privileged Keycloak user
  2. Delivery
    Target realm using JSON-type protocol mapper
  3. Exploit
    Inject forged client roles into JSON claim
  4. Execution
    Bypass Java-map-only role sanitization
  5. Persist
    Receive token with escalated roles
  6. Impact
    Access protected resources

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation, allowlisting
Exploitation Conditions

Exploitation requires a Keycloak realm in which a protocol mapper is configured to emit structured claims using the JSON type - this is a specific non-default configuration, not stock behavior. The attacker must hold an authenticated low-privileged account (CVSS PR:L), after which the sanitization routine's failure to recognize Jackson-based JSON objects (it inspects only standard Java maps) lets forged client roles pass into the issued token. Limiting factors: realms not using a JSON-type structured-claim mapper are not affected, and valid credentials are required, so unauthenticated exploitation is not possible; impact is limited to integrity/authorization (C:N, A:N).

Impact

This is a moderate-severity authorization flaw (CVSS 6.5) in Keycloak's token sanitization logic. The CVSS vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N indicates a network-reachable, low-complexity attack that requires low-level authentication (PR:L) and no user interaction, with impact confined to integrity (I:H) - no confidentiality or availability loss. The vuln.today decision label is 'this_month', not 'act_now' or 'emergency', consistent with a real but non-critical priority. No EPSS score, CISA KEV listing, or POC/exploit reference is present in the supplied data, so there is no public exploit identified at time of analysis and no evidence of active exploitation. Two signals temper the raw score: exploitation depends on a specific non-default configuration (a protocol mapper emitting JSON-type structured claims), and the attacker must already hold an authenticated account. Taken together these point to a legitimate but conditional authorization-integrity risk rather than a widespread, trivially exploitable issue - schedule patching this cycle rather than treating it as an emergency.

Exploit ScenarioDerived

In a Keycloak realm where a protocol mapper is configured to emit structured claims using the JSON type, an authenticated low-privileged user requests a security token. Because the role-sanitization check only recognizes standard Java maps and ignores Jackson-based JSON objects, forged client roles embedded in the JSON claim survive sanitization and are issued in the token, which the attacker then presents to reach protected resources beyond their granted authorization. No public exploit is identified at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 06, 2026

Keycloak's token sanitization logic can be bypassed so that forged client roles are written into issued security tokens, giving an authenticated low-privileged user access to resources protected by those roles (CVSS 6.5, integrity-only impact). The flaw only manifests in realms where a protocol mapper is configured to emit structured claims using the JSON type, because the sanitizer inspects only standard Java maps and does not recognize Jackson-based JSON objects; realms without such a mapper are unaffected. The CVSS vector (AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N) confirms valid credentials are required, so unauthenticated exploitation is not possible, and no public exploit code or CISA KEV entry is associated with this CVE at time of analysis.

RemediationAI

No fixed Keycloak version is stated in the supplied data, so confirm the patched build from the Red Hat advisory (https://access.redhat.com/security/cve/CVE-2026-97848) and the Bugzilla entry (https://bugzilla.redhat.com/show_bug.cgi?id=2540960) and upgrade to that release when it is identified. Until then, the most direct compensating control is configuration-level: inventory every realm's protocol mappers and remove or replace any mapper configured to emit structured claims with the JSON type - mapping the same claim as a String type or via a mapper that produces a standard Java map keeps the sanitizer effective, at the cost of changing the token claim format for downstream resource servers that may parse it as JSON. Where such mappers cannot be removed, restrict the roles assigned to low-privileged accounts and audit token issuance for unexpected client role claims, though this reduces rather than eliminates exposure because the sanitization bypass itself remains. Additional vendor guidance and any configuration flags should be taken from the advisory rather than assumed, and resource servers that perform authorization purely on token role claims should be reviewed for additional server-side role checks as a defense in depth.

Affected VersionsENISA

Red Hat build of Keycloak 26.4 patch: 26.4-30
Red Hat build of Keycloak 26.4 patch: 26.4.17-2
Red Hat build of Keycloak 26.4 patch: 26.4-29

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Keycloak protocol mappers shape the claims placed into access, ID and refresh tokens; some mappers emit structured claims, and when the JSON claim type is selected the resulting value is a Jackson-serialized JSON object rather than a java.util.Map. The pre-issuance sanitization routine that strips unauthorized role mappings performs its type check against standard Java map implementations, so a Jackson JSON object passes through uninspected and attacker-supplied client role entries survive into the token. The root cause class is CWE-20 (improper input validation) - a type-confusion-style validation gap in which the security control's assumption about the concrete object type does not hold for all supported mapper configurations. Because the flaw lives in claim sanitization rather than in authentication, the resulting failure mode is an authorization/integrity problem: downstream resource servers that trust the role claims in the token grant access the user should not have. Exploitability is gated by two concrete preconditions stated in the assessment: the realm must use a JSON-typed structured-claim protocol mapper, and the attacker must hold a valid low-privileged account. The exact mechanics of how the forged role entries are injected into the mapper output are not described in the available sources.

Know when Keycloak gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (redhat) PRIMARY 6.5 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
vuln.today AI 6.5 MEDIUM

Network-facing token endpoint with low complexity; an authenticated low-privileged account is required so PR:L; impact is forged-role integrity only, so C:N/I:H/A:N.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
Red Hat 6.5 MEDIUM

Primary rating from Vendor (redhat).

CVSS VectorVendor: redhat

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

DescriptionCVE.org

A flaw was found in the token sanitization logic of Keycloak, an open source identity and access management solution. The issue occurs when a protocol mapper is configured to emit structured claims using the JSON type. The security check designed to remove unauthorized role mappings only looks for standard Java maps and fails to recognize Jackson based JSON objects. This allows an attacker to inject forged client roles into security tokens, which could lead to unauthorized access to protected resources.

Threat Intelligence Overview

EPSS Score
0.3%
Top 83% exploitable
Prevalence
High
widely deployed open-source enterprise IAM (Keycloak / Red Hat build)
Social Media
2
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
High

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

CVE-2023-48795 MEDIUM POC
5.9 Dec 18

The SSH transport protocol with certain OpenSSH extensions, found in OpenSSH before 9.6 and other products, allows remot

CVE-2014-3709 HIGH POC
8.8 Oct 18

The org.keycloak.services.resources.SocialResource.callback method in JBoss KeyCloak before 1.0.3.Final allows remote at

CVE-2024-1132 HIGH POC
8.1 Apr 17

A flaw was found in Keycloak, where it does not properly validate URLs included in a redirect. Rated high severity (CVSS

CVE-2023-6563 HIGH POC
7.7 Dec 14

An unconstrained memory consumption vulnerability was discovered in Keycloak. Rated high severity (CVSS 7.7), this vulne

CVE-2022-1466 MEDIUM POC
6.5 Apr 26

Due to improper authorization, Red Hat Single Sign-On is vulnerable to users performing actions that they should not be

CVE-2017-7474 CRITICAL
9.8 May 12

It was found that the Keycloak Node.js adapter 2.5 - 3.0 did not handle invalid tokens correctly. Rated critical severit

CVE-2026-76187 CRITICAL
9.8 Sep 15

Authentication bypass in the Apache Airflow Keycloak auth manager provider (apache-airflow-providers-keycloak below 0.10

CVE-2022-1245 CRITICAL
9.8 Jul 08

A privilege escalation flaw was found in the token exchange feature of keycloak. Rated critical severity (CVSS 9.8), thi

CVE-2019-14910 CRITICAL
9.8 Dec 05

A vulnerability was found in keycloak 7.x, when keycloak is configured with LDAP user federation and StartTLS is used in

CVE-2021-20195 CRITICAL
9.6 May 28

A flaw was found in keycloak in versions before 13.0.0. Rated critical severity (CVSS 9.6), this vulnerability is remote

CVE-2023-6134 MEDIUM POC
5.4 Dec 14

A flaw was found in Keycloak that prevents certain schemes in redirects, but permits them if a wildcard is appended to t

CVE-2022-0225 MEDIUM POC
5.4 Aug 26

A flaw was found in Keycloak. Rated medium severity (CVSS 5.4), this vulnerability is remotely exploitable, low attack c

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy