Description
python-jose through 3.5.0 contains an authentication bypass vulnerability that allows unauthenticated attackers to forge JWTs because HMACKey and CryptographyHMACKey accept zero-length HMAC secrets. When an application's HS256/HS384/HS512 verification key resolves to empty, such as an oct JWK with empty k, attackers can forge tokens with arbitrary claims that jwt.decode accepts.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| mpdavis | python-jose | ≤ 3.5.0 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 12 | python-jose | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 24.04 LTS | python-jose | No fix yet | — |
| Ubuntu 22.04 LTS | python-jose | No fix yet | — |
References
- https://github.com/mpdavis/python-jose/issues/398 issue-tracking
- https://github.com/mpdavis/python-jose/blob/3.5.0/jose/backends/native.py technical-description
- https://github.com/mpdavis/python-jose/blob/3.5.0/jose/backends/cryptography_backend.py technical-description
- VulnCheck Advisory: python-jose through 3.5.0 Authentication Bypass via Empty HMAC Key third-party-advisory