Title: Bump pyjwt from 2.12.0 to 2.13.0 in /integration_test/synapse/synapse-develop by dependabot[bot] · Pull Request #99 · sorydima/REChain- · GitHub
Open Graph Title: Bump pyjwt from 2.12.0 to 2.13.0 in /integration_test/synapse/synapse-develop by dependabot[bot] · Pull Request #99 · sorydima/REChain-
X Title: Bump pyjwt from 2.12.0 to 2.13.0 in /integration_test/synapse/synapse-develop by dependabot[bot] · Pull Request #99 · sorydima/REChain-
Description: WarningDependabot will stop supporting python v3.9!
Please upgrade to one of the following versions: v3.9, v3.10, v3.11, v3.12, v3.13, or v3.14.
Bumps pyjwt from 2.12.0 to 2.13.0.
Release notes
Sourced from pyjwt's releases.
2.13.0
PyJWT 2.13.0 — Security Release
This release bundles five security fixes plus three additional hardening / spec-compliance changes. We recommend all users upgrade.
Security
GHSA-xgmm-8j9v-c9wx — JWK JSON accepted as HMAC secret (algorithm confusion). HMACAlgorithm.prepare_key previously rejected PEM- and SSH-formatted asymmetric keys but did not catch a JWK passed as a raw JSON string. In a verifier configured with both symmetric and asymmetric algorithms in algorithms=[…] and a raw-JSON JWK as the key, an attacker could forge HS256 tokens using the JWK text as the HMAC secret. The guard has been extended to reject any JWK-shaped JSON. Reported by @aradona91.
GHSA-jq35-7prp-9v3f — Algorithm allow-list bypass with PyJWK / PyJWKClient. When verifying with a PyJWK, the caller's algorithms=[…] allow-list was checked against the token header alg as a string only; actual verification used the algorithm bound to the PyJWK. An attacker who controlled a registered JWKS key could sign with one algorithm and advertise another on the header. PyJWT now requires the token header alg to match the PyJWK's algorithm before verification. Reported by @sushi-gif.
GHSA-w7vc-732c-9m39 — DoS via base64 decode of unused payload segment when b64=false. For detached-payload JWS (b64=false), the compact-form payload segment was base64-decoded before being discarded in favor of the caller-supplied detached_payload. An attacker could inflate the unused segment to force CPU + memory cost without holding a valid signature. The segment is now required to be empty per RFC 7515 Appendix F, and is no longer decoded. Reported by @thesmartshadow.
GHSA-993g-76c3-p5m4 — PyJWKClient accepts non-HTTP(S) URIs. PyJWKClient.fetch_data passed its URI to urllib.request.urlopen, which by default also handles file://, ftp://, and data: schemes. An application that fed an attacker-influenced URI into PyJWKClient could be coerced into reading local files or reaching other unintended schemes. PyJWKClient now rejects any URI whose scheme isn't http or https. Reported by @KEIJOT.
GHSA-fhv5-28vv-h8m8 — PyJWKClient cache wiped on fetch error. A finally-block put(jwk_set=None) cleared the JWK Set cache whenever a fetch raised, turning a transient JWKS-endpoint outage into application-wide auth failure. The cache write was moved into the success path; transient errors no longer evict valid cached keys. Reported by @eddieran.
Fixed
Reject empty HMAC keys outright in HMACAlgorithm.prepare_key with InvalidKeyError instead of accepting them with only a warning. Defends against the os.getenv("JWT_SECRET", "") footgun. Thanks to @SnailSploit and @spartan8806 for the reports.
Forward per-call options (including enforce_minimum_key_length) from PyJWT.decode through to PyJWS._verify_signature. The option was previously silently dropped between the two layers, so it only took effect when set on the PyJWT instance. Thanks to @WLUB for the report.
RFC 7797 §3 compliance for b64=false: the encoder now auto-adds "b64" to crit, and the decoder rejects tokens that set b64=false without listing it in crit. Thanks to @MachineLearning-Nerd for the report.
Changed
Migrate the dev, docs, and tests package extras to dependency groups, by @kurtmckee in #1152.
Upgrade notes
Most fixes are invisible to correctly-configured callers. A few behavioral changes you may encounter:
Empty HMAC keys now raise. If your app passed "" or b"" as a secret (often via a missing env var, e.g. os.getenv("JWT_SECRET", "")), encode/decode will now raise InvalidKeyError. This is the intended behavior — fix the configuration.
PyJWK decoding now requires the token's alg to match the JWK's algorithm. Previously a mismatch was silently honored if the header alg appeared in the allow-list. Tokens that relied on this mismatch will now fail with InvalidAlgorithmError.
PyJWKClient now rejects non-HTTP(S) URIs at construction time. Tests or dev environments that fetched JWKS from file:// URIs need to switch to a local HTTP server or load the JWKS by other means (e.g. construct PyJWKSet.from_dict(...) directly).
b64=false tokens are now strictly RFC 7515 / 7797 compliant. Tokens with a non-empty compact-form payload segment, or that omit "b64" from crit, will be rejected. PyJWT-produced tokens always satisfy both invariants, so round-trips through PyJWT are unaffected.
enforce_minimum_key_length set per-call now takes effect. Callers who passed options={"enforce_minimum_key_length": True} to jwt.decode() previously got no enforcement; they will now get InvalidKeyError on undersized keys, as documented.
Full changelog: jpadilla/pyjwt@2.12.1...2.13.0
2.12.1
What's Changed
Add typing_extensions dependency for Python < 3.11 by @jpadilla in jpadilla/pyjwt#1151
Full Changelog: jpadilla/pyjwt@2.12.0...2.12.1
Changelog
Sourced from pyjwt's changelog.
v2.13.0
Open Graph Description: WarningDependabot will stop supporting python v3.9! Please upgrade to one of the following versions: v3.9, v3.10, v3.11, v3.12, v3.13, or v3.14. Bumps pyjwt from 2.12.0 to 2.13.0. Release notes S...
X Description: WarningDependabot will stop supporting python v3.9! Please upgrade to one of the following versions: v3.9, v3.10, v3.11, v3.12, v3.13, or v3.14. Bumps pyjwt from 2.12.0 to 2.13.0. Release notes S...
Opengraph URL: https://github.com/sorydima/REChain-/pull/99
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:f15f3b6a-0bc0-994d-3644-2be9f291bcf9 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | CA6C:22EDEC:17E8F10:211D362:6A4BFDBC |
| html-safe-nonce | 9580603cd873f32b9b1ee7715b4a25745da731a82d1804321ccbdff472da274e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTZDOjIyRURFQzoxN0U4RjEwOjIxMUQzNjI6NkE0QkZEQkMiLCJ2aXNpdG9yX2lkIjoiMjQ0OTM4NDY0OTE0MDIwNzAzNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | bc4e5037473ace91d68f1694e84e2d2fea48d934687afe049fb693f88d4e0e24 |
| hovercard-subject-tag | pull_request:3872436114 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/sorydima/REChain-/pull/99/files |
| twitter:image | https://avatars.githubusercontent.com/in/29110?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/in/29110?s=400&v=4 |
| og:image:alt | WarningDependabot will stop supporting python v3.9! Please upgrade to one of the following versions: v3.9, v3.10, v3.11, v3.12, v3.13, or v3.14. Bumps pyjwt from 2.12.0 to 2.13.0. Release notes S... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0f5d3ba365b3985d75c32a5957c8635488d58dcf027ae6ae958eee7edaa306a2 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/sorydima/REChain- git https://github.com/sorydima/REChain-.git |
| octolytics-dimension-user_id | 43252008 |
| octolytics-dimension-user_login | sorydima |
| octolytics-dimension-repository_id | 597727499 |
| octolytics-dimension-repository_nwo | sorydima/REChain- |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 597727499 |
| octolytics-dimension-repository_network_root_nwo | sorydima/REChain- |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6c542436f9c7282f518e9ec7bc5a3adff20a13fd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width