# CVE-2026-48523: PyJWT: Algorithm allow-list bypass when decoding with `PyJWK` / `PyJWKClient` keys

> Attackers can bypass JWT algorithm allow-lists when using PyJWK keys, allowing tokens signed with disallowed algorithms to be accepted as valid.

- **Severity:** Medium 5.4 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 28 May 2026
- **Updated:** 28 May 2026
- **Also known as:** BELL-CVE-2026-48523, CLEANSTART-2026-HM72127, DEBIAN-CVE-2026-48523, ECHO-894a-8fa2-a1b5, GHSA-jq35-7prp-9v3f, MINI-2p3c-ghvh-749x, MINI-4hxm-pmvv-mmw4, MINI-5mcj-493v-gjcm, MINI-5q79-p9jf-275v, MINI-5w8x-8qrj-pq6m, MINI-6xfh-8ggj-fq62, MINI-78jg-gwjf-rr97, MINI-799g-23pr-hggr, MINI-7x5h-fgqq-8q8r, MINI-9wrv-v6ww-4frp, MINI-c5m7-m26g-47hr, MINI-c6jm-cwfc-22jp, MINI-crh8-qmvq-q696, MINI-f67x-h2h8-hx9w, MINI-f8qm-48rw-cp4h, MINI-gmx6-48w4-fj64, MINI-h2h2-h868-wcgg, MINI-h778-34h4-5q7x, MINI-hg72-fjw9-rghj, MINI-j7pm-xj95-5wh9, MINI-m36h-hvqr-x3fx, MINI-m3r3-8w22-88gp, MINI-pp8r-r9qq-jg6c, MINI-prh3-67pp-rc4m, MINI-q67r-r565-xgmc, MINI-rp2m-6q22-vx9p, MINI-wqqx-8847-4j4q, MINI-wv3w-vrrx-x9w6, PYSEC-2026-176, ROOT-APP-PYPI-CVE-2026-48523, UBUNTU-CVE-2026-48523

## What is CVE-2026-48523?

CVE-2026-48523 is a medium-severity vulnerability in jpadilla pyjwt, published on 28 May 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

PyJWT is a JSON Web Token implementation in Python. From 2.9.0 to 2.12.1, there is a verifier-side algorithm allow-list bypass when jwt.decode() or jwt.decode_complete() are called with a PyJWK key. The token header alg is checked against the caller-supplied algorithms allow-list, but signature verification is performed with the algorithm bound to the PyJWK object instead of the header algorithm. An attacker who controls a registered JWK/JWKS private key can sign with a disallowed algorithm, advertise an allowed algorithm in the JWT header, and still be accepted. The issue affects the documented PyJWKClient.get_signing_key_from_jwt(...) flow. This vulnerability is fixed in 2.13.0.

Weakness: CWE-347 (Improper Verification of Cryptographic Signature)

## Which versions are affected by CVE-2026-48523?

3 open source packages ship an affected version, including pyjwt. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `pyjwt` | PyPI | From 2.9.0 | 2.12.1 |
| `pyjwt` | PyPI | From 2.9.0 | 2.13.0 |
| `pyjwt` | PyPI | From 2.9.0 | 2.13.0 |

Products: Pyjwt Project Pyjwt.

## How do I fix CVE-2026-48523?

Upgrade pyjwt to a fixed version for your release line: 2.12.1 or 2.13.0.

## Is CVE-2026-48523 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-48523 exists.

## Other vulnerabilities in jpadilla pyjwt

- [CVE-2026-102268](https://insights.sbomify.com/CVE-2026-102268/): PyJWT: Asymmetric-PEM detection bypass: whitespace/line-ending-mutated public keys skip the HS/asymmetric confusion guard (critical 9.1)
- [CVE-2026-32597](https://insights.sbomify.com/CVE-2026-32597/): PyJWT accepts unknown `crit` header extensions (RFC 7515 §4.1.11 MUST violation) (high 7.5)
- [CVE-2026-102266](https://insights.sbomify.com/CVE-2026-102266/): PyJWK accepts empty HMAC keys, bypassing PyJWT's empty-key validation (high 7.4)
- [CVE-2026-102267](https://insights.sbomify.com/CVE-2026-102267/): PyJWT: PyJWKClient follows redirects when fetching JWKS (high 7.4)
- [CVE-2026-102271](https://insights.sbomify.com/CVE-2026-102271/): PyJWT: Public keys in DER form are accepted as HMAC secrets, bypassing the CVE-2022-29217 guard (high 7.4)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-48523 and fix it if it is affected.

What it is: CVE-2026-48523 is a medium-severity vulnerability in jpadilla pyjwt, published on 28 May 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-48523 exists.

Affected packages and fixed versions:
- pyjwt (PyPI): affected from 2.9.0; fixed in 2.12.1
- pyjwt (PyPI): affected from 2.9.0; fixed in 2.13.0
- pyjwt (PyPI): affected from 2.9.0; fixed in 2.13.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-48523/ (Markdown: https://insights.sbomify.com/CVE-2026-48523/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-48523
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-48523
- OSV: https://osv.dev/vulnerability/CVE-2026-48523

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-48523/
Summaries are generated and may contain mistakes; the official description above is the record.
