Skip to content

fix(relay-auth): reject expired JWTs in verifyJWT - #279

Open
SashaMIT wants to merge 1 commit into
WalletConnect:masterfrom
SashaMIT:fix/relay-auth-verify-jwt-exp
Open

fix(relay-auth): reject expired JWTs in verifyJWT#279
SashaMIT wants to merge 1 commit into
WalletConnect:masterfrom
SashaMIT:fix/relay-auth-verify-jwt-exp

Conversation

@SashaMIT

@SashaMIT SashaMIT commented Aug 8, 2026

Copy link
Copy Markdown

Summary

  • @walletconnect/relay-auth signJWT always sets exp, but verifyJWT only checked the EdDSA signature.
  • A captured relay JWT therefore remained valid forever against verifyJWT until the client key rotates.
  • After signature verification, require a finite payload.exp and reject when exp <= now.

Sibling of open cacao #278 (distinct surface).

Test plan

  • npm run build -- --filter=./relay/relay-auth && npm test --workspace=@walletconnect/relay-auth → 6/6
  • Fresh JWT verifies; expired JWT (ttl elapsed) returns false; historical EXPECTED_JWT fails closed on expiry
  • CI green on this PR

Tooling assist used for prep; commit authored/signed by me (no Cursor co-author trailer).

Made with Cursor

signJWT always sets exp, but verifyJWT only checked the EdDSA signature,
so a captured relay JWT remained valid forever. Fail closed on missing or
stale exp after signature verification.

Signed-off-by: Sasha Mitchell <sash.t.mitchell@gmail.com>
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

Thank you for your contribution! We ask that you please read and sign our CTA Document before we can accept your contribution. You can sign the CTA simply by posting a Pull Request Comment with the following text:


I have read the CTA Document and I hereby sign the CTA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

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.

1 participant