Description
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.
Published: 2026-08-29
Score: 8.6 High
EPSS: < 1% Very Low
KEV: No
Impact: Privilege Escalation
Action: Patch
AI Analysis

Impact

pac4j-oidc before version 6.5.6 fails to verify the signature, issuer, audience, or expiration of Keycloak access tokens when extracting realm and client roles. The omission allows an attacker to forge an access token that includes administrative roles while pairing it with a valid ID token. When such a forged token is used, applications that rely on pac4j for role validation bypass normal authorization checks, effectively granting the attacker elevated privileges. The vulnerability is a classic instance of improper token validation, categorised as CWE‑347, and can lead to unauthorized actions such as modifying application configuration, accessing protected resources, or escalating privileges across the system.

Affected Systems

The issue impacts the Pac4j library, specifically pac4j-oidc components in versions prior to 6.5.6. Any application that integrates this library for Keycloak SSO and relies on pac4j role extraction is potentially affected.

Risk and Exploitability

With a CVSS score of 8.6, the vulnerability is considered high severity. EPSS data is not available, and the vulnerability is not listed in the CISA KEV catalog, indicating no known public exploits at the time of analysis. Attackers must be able to submit a forged token, which typically requires network access to the authentication endpoint or control over the token creation process. Since the vulnerability arises from the lack of signature verification, an attacker can freely generate a token that satisfies all expected claims apart from the signature. Once the forged token is presented to the application, privileged actions can be performed without further authentication steps.

Generated by OpenCVE AI on August 29, 2026 at 17:52 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade pac4j-oidc to 6.5.6 or later where token signature, issuer, audience, and expiry checks are enforced. This is the official fix and the recommended first step.
  • Apply the token validation patch from commit 2270c3ff70e93cc43831e75702acd5135531237e to the KeycloakRolesAuthorizationGenerator class if an upgrade is not yet possible; this re‑enables proper signature and claim verification.
  • Implement additional server‑side role validation or restrict administrative scopes in Keycloak, ensuring that any privilege assignments are explicitly verified against an authoritative source and not solely based on pac4j extracted roles.

Generated by OpenCVE AI on August 29, 2026 at 17:52 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 31 Aug 2026 19:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Sat, 29 Aug 2026 16:45:00 +0000

Type Values Removed Values Added
Description 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.
Title pac4j-oidc before 6.5.6 Privilege Escalation via Unverified Keycloak Access Token
First Time appeared Pac4j
Pac4j pac4j
Weaknesses CWE-347
CPEs cpe:2.3:a:pac4j:pac4j:*:*:*:*:*:*:*:*
Vendors & Products Pac4j
Pac4j pac4j
References
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N'}

cvssV4_0

{'score': 8.6, 'vector': '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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-31T18:52:57.662Z

Reserved: 2026-08-29T14:11:00.266Z

Link: CVE-2026-82461

cve-icon Vulnrichment

Updated: 2026-08-31T16:23:25.821Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-08-29T17:17:58.207

Modified: 2026-09-10T19:54:25.810

Link: CVE-2026-82461

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-29T18:30:13Z

Weaknesses
  • CWE-347

    Improper Verification of Cryptographic Signature