# CVE-2026-48523: PyJWT algorithm allow-list bypass in PyJWK verification

Source: https://junglewise.ai/threats/cve-2026-48523-pyjwt-algorithm-allow-list-bypass-in-pyjwk-verification  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-28. Updated: 2026-06-15  
License: CC BY 4.0 with a link back

CVE-2026-48523 · Severity: medium · CVSS 5.4 · Published 2026-05-28

PyJWT is a popular library used to handle JSON Web Tokens (JWTs) for authentication and data exchange. A vulnerability in certain versions allows an attacker who already has a valid signing key to bypass security restrictions on which cryptographic algorithms are allowed. This could allow an attacker to use weaker or deprecated security methods that the system was configured to reject, potentially undermining the integrity of the authentication process.

Technologies: [pyjwt (PyPI)](https://junglewise.ai/threats/technologies/pypi-pyjwt). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-48523 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-48523 being exploited in the wild.

**How severe is CVE-2026-48523?** Medium severity, with a CVSS score of 5.4, published 28 May 2026.

**Which products and versions are affected?** pyjwt (PyPI) ECOSYSTEM:introduced=2.9.0,fixed=2.12.1, ECOSYSTEM:introduced=2.9.0,fixed=2.13.0.

**Is there a fix for CVE-2026-48523?** Yes. pyjwt (PyPI): upgrade to 2.12.1, 2.13.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-48523 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-48523?** Check whether you run pyjwt (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- pyjwt (PyPI): upgrade to 2.12.1, 2.13.0 or later

  ```sh
  pip install "pyjwt>=2.13.0"
  ```


## Technical details

A vulnerability in PyJWT's `_verify_signature()` logic in `jwt/api_jws.py` causes an algorithm allow-list bypass when `PyJWK` objects are used for verification. While the library checks the JWT header's `alg` field against the user-provided `algorithms` allow-list, it performs the actual signature verification using the algorithm bound to the `PyJWK` object itself rather than the one specified in the header. An attacker who controls a registered JWK/JWKS private key can sign a token with a disallowed algorithm (e.g., RS256) but set the header to an allowed one (e.g., PS256), and the token will be accepted. This issue affects the documented `PyJWKClient.get_signing_key_from_jwt()` flow and was introduced in version 2.9.0. It is fixed in version 2.13.0.

## Affected products

- jpadilla PyJWT >= 2.9.0, < 2.13.0

## Identifiers

- CVE-2026-48523
- GHSA-jq35-7prp-9v3f
- PYSEC-2026-176

## Timeline

- 2026-05-21: advisory: GitHub Advisory published
- 2026-06-15: disclosed: CVE-2026-48523 published
- patched: Fixed in version 2.13.0

## References

- [https://api.github.com/users/sushi-gif](https://api.github.com/users/sushi-gif)
- [https://github.com/sushi-gif](https://github.com/sushi-gif)
- [https://api.github.com/users/sushi-gif/gists%7B/gist_id%7D](https://api.github.com/users/sushi-gif/gists%7B/gist_id%7D)
- [https://api.github.com/users/sushi-gif/repos](https://api.github.com/users/sushi-gif/repos)
- [https://avatars.githubusercontent.com/u/64688607?v=4](https://avatars.githubusercontent.com/u/64688607?v=4)
- [https://api.github.com/users/sushi-gif/events%7B/privacy%7D](https://api.github.com/users/sushi-gif/events%7B/privacy%7D)

## Related threats

- [PyJWT HS256/384/512 token forgery via empty HMAC key in oct JWK](https://junglewise.ai/threats/pyjwt-hs256-384-512-verify-accepts-empty-hmac-key-via-oct-jwk-pyjwk-a3ba63d2)
- [PyJWT decode() options-dict mutation enabling claim-verification bypass](https://junglewise.ai/threats/cve-2026-103001-pyjwt-decode-reintroduces-options-dict-mutation-enabling-silent)
- [PyJWT OKP algorithm key validation bypass](https://junglewise.ai/threats/cve-2026-102275-pyjwt-is-a-python-implementation-of-json-web-token-standards)
- [PyJWT unhandled ValueError in JWK Set parsing](https://junglewise.ai/threats/cve-2026-102274-pyjwt-is-a-python-implementation-of-json-web-token-standards)
- [PyJWT HMAC key validation bypass in HMACAlgorithm.prepare_key](https://junglewise.ai/threats/cve-2026-102273-pyjwt-is-a-python-implementation-of-json-web-token-standards)
