Skip to content

Use JWT header alg when verifying MDS blob - #788

Merged
MasterKale merged 3 commits into
masterfrom
fix/786-mds-blob-jwt-alg
Aug 26, 2026
Merged

Use JWT header alg when verifying MDS blob#788
MasterKale merged 3 commits into
masterfrom
fix/786-mds-blob-jwt-alg

Conversation

@MasterKale

@MasterKale MasterKale commented Aug 26, 2026

Copy link
Copy Markdown
Owner

This PR fixes MDS blob verification to properly use the JWT header's "alg" property to determine which hash algorithm to use to verify the signature.

MDS blobs are too big to include as test data (10MB+) so I verified locally that this fixed the issue identified in #786 with the latest MDS blob from https://mds3.fidoalliance.org that has "alg": "RS256" in its header:

import { verifyMDSBlob } from './src/helpers/index.ts';

const blob = await Deno.readTextFile('./blob.jwt');

const verified = await verifyMDSBlob(blob);

console.log(verified.parsedNextUpdate);
// 2026-09-01T07:00:00.000Z

Fixes #786.

@MasterKale MasterKale added the package:server @simplewebauthn/server label Aug 26, 2026
@MasterKale
MasterKale merged commit 9bf80bf into master Aug 26, 2026
4 checks passed
@MasterKale
MasterKale deleted the fix/786-mds-blob-jwt-alg branch August 26, 2026 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package:server @simplewebauthn/server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RSA blob verification derives the hash from the leaf cert's CA signature algorithm instead of the JWT's declared alg

1 participant