Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to Keycloak with low-privilege account
-
DeliveryObtain valid ID token via normal OIDC login
-
ExploitCraft forged access token embedding admin role claims
-
ExecutionSubmit valid ID token paired with forged access token to pac4j application
-
Persistpac4j extracts Keycloak roles without signature or claim validation
-
ImpactAttacker gains unauthorized administrative role privileges
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A04:2025 - Cryptographic Failures
ASVS 5.0
V11 - Cryptography Signature verification
|
| Exploitation Conditions | Exploitation requires three specific conditions: (1) the target application uses pac4j-oidc's |
| Impact | The vendor-provided CVSS 4.0 score of 8.6 accurately reflects the severity: the attack is network-reachable (AV:N), low complexity (AC:L), requires no special attack conditions (AT:N), but does require low-level privileges (PR:L) - the attacker must possess a legitimate Keycloak user account to obtain a valid ID token. High confidentiality and integrity impacts (VC:H/VI:H) are warranted given that successful exploitation grants self-assigned administrative roles across all pac4j-protected resources. No EPSS data was provided; the absence of KEV listing and public POC tempers the immediacy of exploitation risk, though the attack mechanism is conceptually straightforward for any OIDC-familiar attacker. The most important limiting factor is PR:L: unauthenticated external attackers cannot exploit this without first compromising or registering a Keycloak account. Organizations where guest or self-registration is enabled face meaningfully higher real-world risk than those with tightly controlled identity issuance. |
| Exploit ScenarioDerived | An attacker with a low-privilege Keycloak account completes a normal OIDC login to obtain a legitimate ID token. They then craft a separate unsigned (or arbitrarily signed) access token containing Keycloak realm role claims such as |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 29, 2026
Privilege escalation in pac4j-oidc before 6.5.6 allows authenticated attackers to forge Keycloak access tokens and claim arbitrary administrative roles without cryptographic validation. The KeycloakRolesAuthorizationGenerator component extracted realm and client role claims directly from access token payloads without verifying signatures, issuers, audiences, or expiration - violating core JWT and OIDC validation requirements. Any application relying on pac4j Keycloak role-based authorization is exposed to full authorization bypass; no public exploit has been identified at time of analysis and the vulnerability is not listed in CISA KEV.
RemediationAI
Upgrade pac4j-oidc to version 6.5.6 or later, which adds access token validation before any Keycloak roles are extracted into the user profile. The patch is confirmed in the vendor security advisory at https://www.pac4j.org/blog/security-advisory-pac4j-core-oidc-saml.html and in the upstream fix commit at https://github.com/pac4j/pac4j/commit/2270c3ff70e93cc43831e75702acd5135531237e. For teams unable to upgrade immediately, the most targeted compensating control is to disable KeycloakRolesAuthorizationGenerator and replace Keycloak role resolution with an alternative that operates exclusively on validated claims - for example, querying the Keycloak UserInfo endpoint directly with a bearer token validated server-side, or deriving roles solely from properly verified ID token claims. Note that disabling the generator removes Keycloak role-based authorization entirely until a proper replacement is in place, potentially breaking access controls for legitimate users.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The affected component is KeycloakRolesAuthorizationGenerator.java within the pac4j-oidc module (CPE: cpe:2.3:a:pac4j:pac4j:*:*:*:*:*:*:*:*). pac4j is a widely used Java security framework providing authentication and authorization abstractions. In Keycloak-backed OIDC flows, this generator is responsible for extracting realm-level and client-level role claims from the Keycloak access token JWT, then populating the user profile used for downstream authorization decisions. CWE-347 (Improper Verification of Cryptographic Signature) identifies the root cause: the generator parsed role claims from the raw JWT payload without validating the token's cryptographic signature, issuer (iss), audience (aud), or expiration (exp). RFC 7519 and the OIDC Core specification mandate full claim-set validation before trusting any JWT content. The fix introduced in commit 2270c3ff gates role extraction on successful access token validation, rejecting tokens that fail any of these checks.
Know when Pac4J 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
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
Network-exploitable requiring a valid low-privilege account (PR:L); no scope change; availability unaffected as the attack grants access rather than disrupting service.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
pac4j-oidc before 6.5.6 fails to verify access token signatures, issuers, audiences, or expiry when extracting Keycloak realm and client roles. Attackers can forge access tokens with administrative roles paired with valid ID tokens to bypass authorization checks in applications relying on pac4j role validation.
Executive ViewAI
pac4j-oidc (a Keycloak authentication library) prior to version 6.5.6 allows authenticated users to bypass authorization controls and assume administrative privileges on protected systems. Organizations using this library for access management face risk of unauthorized administrative access by internal or compromised user accounts. This affects the integrity of role-based access controls across any dependent applications.
Apply vendor patch.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
LDAP injection vulnerabilities in PAC4J authentication library allow low-privileged remote attackers to execute arbitrar
Authentication bypass in pac4j-core before 6.5.6 allows authenticated users holding a weaker profile type to access reso
CSRF protection bypass in PAC4J authentication library allows remote attackers to forge state-changing requests without
Session termination via unsigned SAML LogoutRequest in pac4j-saml before 6.5.6 allows unauthenticated remote attackers t
Authentication bypass in pac4j-oidc before 6.5.6 allows remote unauthenticated attackers to establish authenticated sess
Open redirect in pac4j-core before 6.5.6 allows network-accessible attackers to redirect authenticated users to attacker
The SAML identifier generated within SAML2Utils.java was found to make use of the apache commons-lang3 RandomStringUtils
EUVD-2026-68118
GHSA-4w24-77rp-687q
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB