Skip to content

[OID4VCI] Fix credential request decryption alg downgrade vulnerability#50960

Open
dominikschlosser wants to merge 1 commit into
keycloak:mainfrom
dominikschlosser:ghi50934
Open

[OID4VCI] Fix credential request decryption alg downgrade vulnerability#50960
dominikschlosser wants to merge 1 commit into
keycloak:mainfrom
dominikschlosser:ghi50934

Conversation

@dominikschlosser

Copy link
Copy Markdown
Contributor

Closes #50934

@dominikschlosser
dominikschlosser requested a review from a team as a code owner July 16, 2026 14:43
Signed-off-by: Dominik Schlosser <dominik.schlosser@gmail.com>
@ahus1

ahus1 commented Jul 16, 2026

Copy link
Copy Markdown
Member

@dominikschlosser - can you please ask someone from the working group with OID4VCI knowledge to review this one? Once it is reviewed, it is ready to be merged.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Binds OID4VCI credential-request decryption to the realm key’s configured algorithm, preventing JWE algorithm downgrades.

Changes:

  • Rejects mismatched JWE key-management algorithms.
  • Adds downgrade-test support and regression coverage.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
services/.../OID4VCIssuerEndpoint.java Validates JWE alg against the selected key.
tests/base/.../OID4VCIssuerEndpointEncryptionTest.java Tests rejection of RSA1_5 downgrade attempts.
tests/utils-shared/.../Oid4vcCredentialRequest.java Supports overriding the JWE algorithm in tests.

@VinodAnandan

Copy link
Copy Markdown
Contributor

@Ogenbertrand @IngridPuppet @wistefan @tdiesler @pskopek @jimmychakkalakal @graziang @thomasdarimont Could you please help review this PR when you have a chance?

@tdiesler

Copy link
Copy Markdown
Contributor

LGTM

@IngridPuppet IngridPuppet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Credential request decryption accepts RSA1_5 for RSA-OAEP-256 encryption keys

6 participants