Repository navigation
Description
Describe the bug
A flaw was found in Keycloak's Pushed Authorization Request (PAR) implementation. The single-use enforcement for PAR request URIs (required by RFC 9126 §4) is bypassed on the silent authentication path (prompt=none). When an existing SSO session causes the authorization endpoint to short-circuit directly to AuthenticationManager.redirectAfterSuccessfulFlow(), the PAR consumption logic in OIDCLoginProtocol.authenticationComplete() is never invoked, and the pushed request object is never removed from storage. The request_uri remains valid and can be replayed to mint multiple distinct, fully redeemable authorization codes for the same user, violating the single-use guarantee required for FAPI-2 and RFC 9126 compliant deployments.
Version
Reproduced on Keycloak 26.7.3. Present on main branch.
Expected behavior
A PAR request_uri must be consumed — removed from storage — on the first successful authorization code issuance, regardless of whether the user was authenticated interactively or through an existing SSO session. A second authorization request using the same request_uri must be rejected.
Actual behavior
When an existing SSO session satisfies the authorization request, authenticationComplete() is not called and AuthzEndpointParParser.removeRequestObject() is never invoked. The pushed request object remains in storage and the request_uri can be replayed any number of times, each call producing a distinct authorization code that can be exchanged for a valid token set.
Anything else?
- Root cause:
OIDCLoginProtocol.authenticationComplete()(line 604) callsAuthzEndpointParParser.removeRequestObject()to consume the PAR object, but this method is only reached via the interactive login flow throughAuthenticationProcessor.authenticationComplete(). The silent path viaAuthenticationManager.redirectAfterSuccessfulFlow()bypassesloginProtocol.authenticationComplete()entirely. - RFC 9126 §4 states: "The authorization server MUST NOT allow the request_uri to be used more than once."
- This affects deployments relying on FAPI-2 or RFC 9126 single-use PAR guarantees.
This issue was originally tracked in the private repository. Migrated by @abstractj.
Metadata
Metadata
Assignees
Labels
Type
Fields
Projects
- StatusShow more project fieldsDone
Activity
EVIL0RD commentedon Sep 23, 2026
Happy to assist with validation or provide additional details if needed.
abstractj commentedon Sep 30, 2026
@EVIL0RD thank you, PR available for your review #53365
Enforce PAR single-use across all authentication paths
Enforce PAR single-use across all authentication paths
14 remaining items
Enforce PAR single-use across all authentication paths (keycloak#53365)
(26.8) Enforce PAR single-use across all authentication paths (#53679)
Enforce PAR single-use across all authentication paths
Enforce PAR single-use across all authentication paths
Enforce PAR single-use across all authentication paths
Enforce PAR single-use across all authentication paths
Enforce PAR single-use across all authentication paths
Enforce PAR single-use across all authentication paths
Enforce PAR single-use across all authentication paths (keycloak#53365)
Enforce PAR single-use across all authentication paths (keycloak#53365)