Repository navigation
fix: bump authlib to ^1.9.1 and cryptography floor to >=45.0.1 - #169
Conversation
| # Source of truth for dependencies: pyproject.toml + poetry.lock | ||
|
|
||
| authlib>=1.6.12 | ||
| authlib~=1.9 |
There was a problem hiding this comment.
🟠 High severity issue identified in your code:
Risk: Affected versions of Authlib are vulnerable to Improper Authentication / Inadequate Encryption Strength / Use of Weak Credentials. Authlib accepts an empty (zero-length) oct key as a valid HMAC key. If the key passed to JWT/JWS signing or verification is empty, anyone can compute a valid HS256/HS384/HS512 signature and forge tokens with arbitrary claims, bypassing authentication.
Manual Review Advice: A vulnerability from this advisory is reachable if you sign or verify HMAC (HS256/HS384/HS512) tokens with a key that can be empty at runtime, such as an environment variable, configuration value, client secret, or key resolver that defaults to an empty string
Fix: Upgrade this library to at least version 1.9.1 at auth0-api-python/requirements.txt:4.
Reference(s): https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-108517, GHSA-8m4g-j4wp-wgcg, CVE-2026-114616
⭐ Fixed in commit dbfe599 ⭐
| # Source of truth for dependencies: pyproject.toml + poetry.lock | ||
|
|
||
| authlib>=1.6.12 | ||
| authlib~=1.9 |
There was a problem hiding this comment.
🟠 High severity issue identified in your code:
Risk: Affected versions of Authlib are vulnerable to Authorization Bypass Through User-Controlled Key / Insecure Default Initialization of Resource. Authlib's RFC 7592 ClientConfigurationEndpoint does not verify that the presented registration access token was issued to the client being read, updated, or deleted, and the documented implementations of authenticate_client and check_permission do not perform this binding either. Any holder of a valid registration access token (e.g. obtained by self-registering through an open dynamic client registration endpoint) can read another client's metadata and secret, hijack its redirect URIs, or delete it by targeting its client_id.
Manual Review Advice: A vulnerability from this advisory is reachable if you do not verify in your check_permission or authenticate_client implementation that the registration access token belongs to the requested client
Fix: Upgrade this library to at least version 1.9.1 at auth0-api-python/requirements.txt:4.
Reference(s): https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-111112, GHSA-c73q-w75p-j82v, CVE-2026-116672
🌟 Fixed in commit dbfe599 🌟
Changes
Raises the authlib floor to 1.9.1 to pick up upstream security fixes, and raises the cryptography floor to match what authlib 1.9.x requires.
Dependencies
pyproject.tomlauthlib:^1.0becomes^1.9.1(locked 1.7.2 to 1.9.10)cryptography:>=43.0.1becomes>=45.0.1. authlib 1.9.10 declarescryptography>=45.0.1, so the floor we state now matches what actually resolves. The locked version stays at 50.0.2.requirements.txt(read by the Snyk SCA scan):authlib>=1.6.12becomesauthlib~=1.9poetry.lock: only the authlib version and the content hash change. joserfc (1.7.4) already meets authlib's>=1.6.8.Endpoints, classes and methods: none added, removed, deprecated or changed.
Behavior changes from authlib 1.7.2 to 1.9.10
These come from a diff of
authlib/josebetween the two wheels. Every change is a stricter check:Nonesignatureslist is now rejected (rfc7515/jws.py).oct(HMAC) key now rejects empty keys and keys that look like PEM or SSH public keys (rfc7518/oct_key.py). This doesn't apply to this SDK, becauseApiClientonly allowsRS256for access tokens andES256for DPoP proofs.exp: trueis now rejected (rfc7519/claims.py).Integrator impact
authlib.joseraisesAuthlibDeprecationWarningon import (authlib forces it to always show). This repo already saw it with 1.7.2, but integrators still on authlib 1.6.x will see it for the first time. Test suites that run with-W errorwill fail when importing the SDK.Alternatives considered
authlib.josetojoserfcwould remove the deprecation warning. It's left for a follow-up because it changes token verification and needs its own review.authlib<2.0stays, through the caret pin: authlib saysauthlib.jose"will be compatible before version 2.0.0". No 2.x release is on PyPI yet.Testing
poetry install poetry check --lock poetry run pytest poetry run ruff check .poetry check --lockexits 0.pytest: 506 passed, 93% coverage. The only warning is the existingauthlib.josedeprecation atapi_client.py:9.ruff check .: all checks passed.The tests ran against the same resolved versions this PR locks. The later edits to
^1.9.1he lock's content hash.Checklist