# CVE-2026-49852: joserfc: HS256/HS384/HS512 verify accepts empty/nil HMAC key (cross-language sibling of CVE-2026-45363)

> Attackers can forge HMAC-signed JWTs by using empty or nil keys, bypassing authentication in applications using the joserfc library.

- **Severity:** High 8.7 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 17 Jul 2026
- **Updated:** 20 Jul 2026
- **Also known as:** CLEANSTART-2026-RP49018, DEBIAN-CVE-2026-49852, ECHO-9e9b-2656-ec45, GHSA-gg9x-qcx2-xmrh, MINI-f63x-qq5v-whfv, PYSEC-2026-2528, RHSA-2026:42045, ROOT-APP-PYPI-CVE-2026-49852, UBUNTU-CVE-2026-49852, openSUSE-SU-2026:11183-1, openSUSE-SU-2026:21263-1

## What is CVE-2026-49852?

CVE-2026-49852 is a high-severity authentication bypass vulnerability in authlib joserfc, published on 17 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

joserfc is a Python library that provides an implementation of several JSON Object Signing and Encryption (JOSE) standards. Prior to 1.6.8, joserfc.jwt.decode accepts attacker-forged HMAC-signed tokens when the caller-supplied verification key is the empty string or None, because HMACAlgorithm.sign and HMACAlgorithm.verify in src/joserfc/_rfc7518/jws_algs.py pass the output of OctKey.get_op_key(...) to hmac.new(...) and OctKey.import_key in src/joserfc/_rfc7518/oct_key.py only emits a SecurityWarning for keys shorter than 14 bytes without rejecting zero-length input. This issue is fixed in version 1.6.8.

Weakness: CWE-326 (Inadequate Encryption Strength), CWE-287 (Improper Authentication), CWE-1391 (Use of Weak Credentials)

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

3 open source packages ship an affected version, including joserfc.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `joserfc` | PyPI | All versions | 1.6.8 |
| `joserfc` | PyPI | All versions | 1.6.8 |
| `joserfc` | PyPI | All versions | 1.6.8 |
| `jaeger` | Red Hat:hummingbird:1 | All versions | 0:2.19.0-1.2.hum1 |
| `python-joserfc` | openSUSE:Leap 16.0 | All versions | 1.1.0-bp160.3.1 |
| `python-joserfc` | openSUSE:Tumbleweed | All versions | 1.7.2-2.1 |

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

Upgrade joserfc to 1.6.8 or later.

## Is CVE-2026-49852 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2026-49852 is a high-severity authentication bypass vulnerability in authlib joserfc, published on 17 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-49852 exists.

Affected packages and fixed versions:
- joserfc (PyPI): affected all versions; fixed in 1.6.8
- joserfc (PyPI): affected all versions; fixed in 1.6.8
- joserfc (PyPI): affected all versions; fixed in 1.6.8

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-49852/ (Markdown: https://insights.sbomify.com/CVE-2026-49852/index.md)
```

## Sources

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

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