Skip to main content

pac4j-oidc EUVDEUVD-2026-68118

| CVE-2026-82461 HIGH
Improper Verification of Cryptographic Signature (CWE-347)
2026-08-29 VulnCheck GHSA-4w24-77rp-687q
8.6
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Authenticate to Keycloak with low-privilege account
  2. Delivery
    Obtain valid ID token via normal OIDC login
  3. Exploit
    Craft forged access token embedding admin role claims
  4. Execution
    Submit valid ID token paired with forged access token to pac4j application
  5. Persist
    pac4j extracts Keycloak roles without signature or claim validation
  6. Impact
    Attacker 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 KeycloakRolesAuthorizationGenerator specifically - general OIDC flows not using this generator are unaffected; (2) Keycloak is configured as the OpenID Connect identity provider; (3) the attacker possesses a valid Keycloak account sufficient to obtain a legitimate ID token (PR:L per CVSS 4.0 vector). The ID token itself is not bypassed and must be authentic - only the access token's role claims go unvalidated. Exploitation is limited to the Keycloak-specific role extraction code path; applications using pac4j with non-Keycloak IdPs, or those using alternative role authorization strategies, are not affected. The CVSS PR:L constraint is a meaningful limiting factor: environments with self-registration disabled and controlled identity issuance substantially reduce real-world risk.

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 realm_access.roles: ["admin"] and submit this forged token alongside their valid ID token to a pac4j-protected application endpoint. Because pac4j's KeycloakRolesAuthorizationGenerator extracts roles without validating the access token's signature or claims, the fabricated admin roles are trusted and added to the user profile, granting full administrative authorization bypass.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – 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

pac4j 0 <6.5.6

Affected Packages

euvd pac4j fix: 6.5.6

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

Vendor (VulnCheck) PRIMARY 8.6 HIGH
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
vuln.today AI 8.1 HIGH

Network-exploitable requiring a valid low-privilege account (PR:L); no scope change; availability unaffected as the attack grants access rather than disrupting service.

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

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 92% exploitable
Prevalence
Medium
widely used Java security framework, significant enterprise OIDC adoption
Social Media
2
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment CIRCL GitHub VulDB

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 HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

43
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +43
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.

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