CVE-2026-82461

pac4j-oidc before 6.5.6 Privilege Escalation via Unverified Keycloak Access Token

Published Aug 29, 2026 CVSS 4.0 · 8.6 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

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 available
History
Type Values Removed Values Added
Metrics ssvc

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

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'}

Weaknesses
  • CWE-347

    Improper Verification of Cryptographic Signature

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Aug 31, 2026, 6:52 PM
Reserved
Aug 29, 2026, 2:11 PM
Status
Awaiting Analysis
Published
Aug 29, 2026, 5:17 PM
Modified
Sep 10, 2026, 7:54 PM