You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
org.keycloak.sdjwt 26.8.2: a JWS crit header naming an unknown extension is accepted #55380
When the experimental OID4VC_VP feature is used, SD-JWT verification in org.keycloak.sdjwt accepts a JWS whose protected header contains a crit parameter naming an extension that Keycloak does not understand. RFC 7515, section 4.1.11 requires that a JWS is treated as invalid if any extension listed in crit is not understood and supported by the recipient. Keycloak has no handling of the crit header in org.keycloak.sdjwt or org.keycloak.jose.
This was observed for two parts of an SD-JWT presentation, both caused by the same missing check:
An issuer-signed JWT with "crit": ["urn:example:never-understood"] is accepted.
A key binding JWT with the same crit header is accepted.
The signature checks themselves work: a presentation with a modified issuer signature is refused. The impact is low. The issue does not allow a holder to change what the issuer signed, but it matters wherever an issuer or holder relies on a critical extension being enforced.
Version
26.8.2
Expected behavior
A JWS whose crit header lists an extension that is not understood and supported is rejected as invalid, for both the issuer-signed JWT and the key binding JWT, as required by RFC 7515, section 4.1.11.
Actual behavior
SdJwtVerificationContext.verifyPresentation accepts presentations whose issuer-signed JWT or key binding JWT carries a crit header naming an unknown extension, as long as the signature is valid.
Acknowledgement
Thank you to Egor Khaklin (Khaklin Technologies) for reporting this issue. As it affects the experimental OID4VC_VP feature, it is not subject to CVEs, so this is handled as a weakness in the public repository.
This issue was originally tracked in the private repository. Migrated by @abstractj.
Activity