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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| pac4j | pac4j | < 6.5.6 | 6.5.6 |
References
- Patch Commit patch
- pac4j Security Advisory for pac4j-core, pac4j-oidc and pac4j-saml vendor-advisory
- https://github.com/pac4j/pac4j/blob/pac4j-parent-6.5.5/pac4j-oidc/src/main/java/org/pac4j/oidc/authorization/generator/KeycloakRolesAuthorizationGenerator.java technical-description
- https://github.com/pac4j/pac4j product
- VulnCheck Advisory: pac4j-oidc before 6.5.6 Privilege Escalation via Unverified Keycloak Access Token third-party-advisory