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

- Severity: High 8.7 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.19%, higher than 5% of CVEs (2026-11-30)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-07-02T19:12:08.000Z
- Modified: 2026-10-24T20:10:00.137Z
- Also known as: GHSA-gg9x-qcx2-xmrh, PYSEC-2026-2528
- Weaknesses: CWE-287, CWE-326, CWE-1391
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- authlib joserfc: < 1.6.8
- joserfc (PyPI): before 1.6.8

## Every score

- GitHub_M: CVSS:4.0 8.7 High `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`
- GitHub: CVSS:4.0 High `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`
- PyPA Advisory Database: CVSS:4.0 `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`

## References

- <https://github.com/authlib/joserfc/security/advisories/GHSA-gg9x-qcx2-xmrh> (exploit, web)
- <https://github.com/authlib/joserfc/commit/86d00910b2b2d2d07503fee9b572906daefab7f1> (web)
- <https://github.com/authlib/joserfc/releases/tag/1.6.8>
- <https://github.com/authlib/joserfc> (package)
- <https://github.com/authlib/joserfc/blob/1ddca8f3c73ff47e3bc3ac06cb0c08a9535677ec/src/joserfc/_rfc7518/jws_algs.py#L62-L70> (web)
- <https://pypi.org/project/joserfc> (package)
- <https://github.com/advisories/GHSA-gg9x-qcx2-xmrh> (advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-49852> (advisory)

## Sources

- CVE List: [CVE-2026-49852](https://www.cve.org/CVERecord?id=CVE-2026-49852), CVE Terms of Use, modified 2026-07-20
- GitHub Advisory Database: [GHSA-gg9x-qcx2-xmrh](https://github.com/advisories/GHSA-gg9x-qcx2-xmrh), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-49852](https://nvd.nist.gov/vuln/detail/CVE-2026-49852), Public domain, modified 2026-10-24
- PyPA Advisory Database: [PYSEC-2026-2528](https://osv.dev/vulnerability/PYSEC-2026-2528), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-49852 · Whole record: https://cve.day/CVE-2026-49852.json · Rebuilt by cve.day 2026-11-25T22:59:28.535Z
