fix(deps): update dependency pyjwt to v2.12.0 [security]#589
fix(deps): update dependency pyjwt to v2.12.0 [security]#589renovate[bot] wants to merge 1 commit intomainfrom
Conversation
|
Greptile SummaryThis PR attempts to remediate CVE-2026-32597 — a missing Key issues found:
Confidence Score: 1/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Install workos-python] --> B{Python version?}
B -->|3.8.*| C["Constraint: pyjwt>=2.12,<2.13\n(from this PR)"]
B -->|>=3.9| D["Constraint: pyjwt>=2.10.0\n(unchanged)"]
C --> E{PyJWT 2.12 supports\nPython 3.8?}
E -->|NO - dropped in 2.10| F["❌ Dependency resolution FAILS\nNo compatible version found"]
E -->|YES| G["✅ Would install 2.12.0\n(CVE-2026-32597 fixed)"]
D --> H{Lock file present?}
H -->|YES - uv sync| I["⚠️ Installs pyjwt 2.10.1\nfrom stale uv.lock\n(still VULNERABLE)"]
H -->|NO - fresh install| J{Resolver picks version}
J -->|Picks >=2.12| K["✅ 2.12.0 installed\n(CVE fixed)"]
J -->|Picks 2.10.x or 2.11.x| L["⚠️ Still VULNERABLE\n(loose lower bound >=2.10.0)"]
style F fill:#ff4444,color:#fff
style I fill:#ff9900,color:#fff
style L fill:#ff9900,color:#fff
style G fill:#44bb44,color:#fff
style K fill:#44bb44,color:#fff
Last reviewed commit: ff82cc5 |
| "pydantic>=2.10.4", | ||
| "pyjwt>=2.10.0 ; python_full_version >= '3.9'", | ||
| "pyjwt>=2.9.0,<2.10 ; python_full_version == '3.8.*'", | ||
| "pyjwt>=2.12,<2.13; python_full_version == '3.8.*'", |
There was a problem hiding this comment.
PyJWT 2.12 does not support Python 3.8
The original <2.10 upper bound was intentional: PyJWT 2.10.0 dropped Python 3.8 support (see #1007 — "Drop support for Python 3.8 (EOL)"). Changing the constraint to >=2.12,<2.13 while keeping the python_full_version == '3.8.*' marker will cause a dependency resolution failure for Python 3.8 users because no version in the [2.12, 2.13) range supports Python 3.8.
Running uv sync or pip install on Python 3.8 will fail with something like: "No solution found when resolving dependencies: Because pyjwt (>=2.12,<2.13) requires Python >=3.9 and workos depends on pyjwt>=2.12,<2.13 for Python==3.8.*, no version of workos can be installed on Python 3.8."
Since the CVE fix is only available in 2.12.x which requires Python 3.9+, the project must choose between:
- Dropping Python 3.8 support entirely in
workos-python(Python 3.8 has been EOL since October 2024) - Keeping the
<2.10cap for Python 3.8 and accepting Python 3.8 users are exposed to CVE-2026-32597
| "pyjwt>=2.10.0 ; python_full_version >= '3.9'", | ||
| "pyjwt>=2.9.0,<2.10 ; python_full_version == '3.8.*'", | ||
| "pyjwt>=2.12,<2.13; python_full_version == '3.8.*'", |
There was a problem hiding this comment.
uv.lock not updated — security fix not applied
The uv.lock file was not regenerated as part of this PR. It still pins:
pyjwt 2.9.0forpython_full_version < '3.9'pyjwt 2.10.1forpython_full_version >= '3.9'
Both versions are vulnerable to CVE-2026-32597. Anyone running uv sync (the standard install path) will still receive the old vulnerable versions, making this security fix effectively inert until the lock file is regenerated.
The [package.metadata] section in uv.lock also still reflects the old constraint >=2.9.0,<2.10 for Python 3.8.
The lock file must be regenerated (uv lock) and committed alongside this change for the security fix to actually take effect. The PR table in the description notes 2.10.1 → 2.12.0, implying both the specifier and the resolved lock version should be updated together.
| @@ -12,7 +12,7 @@ dependencies = [ | |||
| "httpx~=0.28.1", | |||
| "pydantic>=2.10.4", | |||
| "pyjwt>=2.10.0 ; python_full_version >= '3.9'", | |||
There was a problem hiding this comment.
Python 3.9+ lower bound still allows vulnerable versions
The Python 3.9+ specifier >=2.10.0 was not tightened to >=2.12.0. While a fresh lock file regeneration would likely resolve to 2.12.0, the loose lower bound means a user performing an unconstrained install (e.g., without the lock file, or in a mixed environment) could still receive PyJWT 2.10.x or 2.11.x — both of which are vulnerable to CVE-2026-32597.
Consider tightening this to >=2.12.0 to close this gap:
| "pyjwt>=2.10.0 ; python_full_version >= '3.9'", | |
| "pyjwt>=2.12.0 ; python_full_version >= '3.9'", |
This PR contains the following updates:
>=2.9.0,<2.10→>=2.12,<2.132.10.1→2.12.0GitHub Vulnerability Alerts
CVE-2026-32597
Summary
PyJWT does not validate the
crit(Critical) Header Parameter defined inRFC 7515 §4.1.11. When a JWS token contains a
critarray listingextensions that PyJWT does not understand, the library accepts the token
instead of rejecting it. This violates the MUST requirement in the RFC.
This is the same class of vulnerability as CVE-2025-59420 (Authlib),
which received CVSS 7.5 (HIGH).
RFC Requirement
RFC 7515 §4.1.11:
Proof of Concept
Expected:
jwt.exceptions.InvalidTokenError: Unsupported critical extension: x-custom-policyActual: Token accepted, payload returned.
Comparison with RFC-compliant library
Impact
gateway using jwcrypto rejects, backend using PyJWT accepts)
critcarries enforcement semantics(MFA, token binding, scope restrictions)
cnf(Proof-of-Possession) can besilently ignored
Suggested Fix
In
jwt/api_jwt.py, add validation in_validate_headers()ordecode():CWE
References
Release Notes
jpadilla/pyjwt (pyjwt)
v2.12.0Compare Source
Fixed
PyJWKClientAPI reference and document the two-tier caching system (JWK Set cache and signing key LRU cache).v2.11.0Compare Source
Fixed
Configuration
📅 Schedule: Branch creation - "" in timezone UTC, Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.