fix(server): upgrade jsonwebtoken 9 -> 11 (JEF-595) - #153
Merged
thejefflarson merged 1 commit intoJul 28, 2026
Conversation
Dependabot #129 stalled on jsonwebtoken 10, which introduced a required crypto-backend feature choice that broke the build. Bumps straight to 11 with the `rust_crypto` backend (a pure-Rust implementation, needed to keep the arm64 cross-compile for the Pi image working without a system OpenSSL/ring toolchain). Validation semantics in access_jwt.rs are byte-identical: RS256-only `Validation::new(Algorithm::RS256)`, `set_issuer`/`set_audience`/ `set_required_spec_claims(["exp","aud","iss"])`, and the fail-open JWKS-unavailable path are all unchanged -- no source edits were needed beyond the manifest bump. Added a new unit test, `wrong_algorithm_rejected`, covering the classic alg-confusion case (HS256-signed token against the RS256-only verifier) alongside the existing valid/expired/wrong-aud/wrong-iss/tampered/unknown-kid/ cold-cache coverage. The jsonwebtoken advisory this closes is MEDIUM (fixed in 10.3.0, superseded here by 11); the repo's one HIGH advisory is a separate, unrelated react-router (UI) finding -- follow-up ticket, not touched here. Supersedes dependabot#129. Closes JEF-595 Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
thejefflarson
deleted the
thejefflarson/jef-595-manually-upgrade-jsonwebtoken-911-dependabot-129-breaks-the
branch
July 28, 2026 16:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
jsonwebtokenfrom 9 to 11 (server/Cargo.toml+Cargo.lock). Dependabot chore(deps): bump jsonwebtoken from 9.3.1 to 11.0.0 in /server #129 had stalled on the jump to v10, which added a required explicit crypto-backend feature choice and broke the build unattended.rust_cryptobackend (pure-Rust) over the alternativeaws_lc_rs/native backends specifically to preserve the arm64 cross-compile for the Raspberry Pi image without introducing a system OpenSSL/AWS-LC toolchain dependency into the Docker cross-build.access_jwt.rsbeyond the manifest bump — the v11decode/Validation/DecodingKeyAPI is unchanged from v9's usage here. Validation semantics are byte-identical: RS256-only allowlist (Validation::new(Algorithm::RS256)),set_issuer/set_audience/set_required_spec_claims(["exp","aud","iss"]), and the fail-open JWKS-unavailable path are all untouched.wrong_algorithm_rejected, covering the classic alg-confusion attack (signing with HS256 against a verifier that only allowlists RS256) — joins the existing valid/expired/wrong-aud/wrong-iss/tampered-signature/unknown-kid/cold-cache coverage in the same file.Advisory note
The jsonwebtoken advisory this closes is MEDIUM severity (patched in 10.3.0, superseded here by 11). GitHub's push output on this branch shows the repo's remaining Dependabot findings as 1 HIGH + 1 MODERATE — the HIGH is react-router (GHSA-qwww-vcr4-c8h2, UI dependency), unrelated to this change and tracked as a separate follow-up, not touched in this PR.
Test plan
cargo fmt— clean, no diffcargo check— cleancargo clippy --all-targets -- -D warnings— clean, zero warningscargo test --locked— 69 unit tests + 66 integration tests, 0 failed. Allaccess_jwtJWT-verification unit tests ran and passed (no DB needed):valid_token_passes,wrong_audience_rejected,wrong_issuer_rejected,expired_token_rejected,tampered_signature_rejected,wrong_algorithm_rejected(new),unknown_kid_rejected,garbage_token_rejected,cold_cache_with_dead_jwks_is_unavailable.pool_or_skipguard (reported as passing, since the test fn returns early) rather than exercising the DB — CI'sserverrequired check runs the full suite against a Postgres sidecar./soundcheck:pr-reviewon the diff: 0 Critical/High findings (dependency bump + one new test, no new attack surface, no relaxed validation)./simplifyon the changed files: already clean, no changes needed (new test mirrors the existing pattern in the file exactly).Closes JEF-595
Supersedes dependabot#129
🤖 Generated with Claude Code