/

CVE-2026-96760

Severity:

CRITICAL RISK

(9.8)

Signature Verification Bypass (CWE-347) in Authlib

CVE-2026-96760

Awaiting Analysis

Vulnerability type

Category:

Signature Verification Bypass

CWE:

CWE-20, CWE-347, CWE-358, CWE-670

Impact:

Authentication and Authorization Bypass

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Authlib versions 1.7.2 and earlier may accept a JSON Serialization JWS object as successfully verified even when it contains no signature and no cryptographic key is supplied. An attacker could exploit this behavior to bypass signature-based validation and cause forged or untrusted claims to be treated as authentic wherever the affected method is used.

Affected context

The vulnerability occurs in applications that use Authlib's JsonWebSignature.deserialize_json() method to process JSON Serialization JWS objects and rely on its result as proof of authenticity. Risk is higher when the application does not independently require a signature, enforce an expected algorithm, validate key material, and reject unsigned or structurally incomplete objects before trusting the payload.

Exploit preconditions

  • Attack surface: Application code that accepts JSON Serialization JWS input through Authlib
  • Required access: Ability to submit or influence a JWS object processed by the affected method
  • Trigger point: Deserialization and verification handling of the JSON Serialization JWS object
  • Why exploitation is possible: The method can return the payload as verified without requiring a signature or cryptographic key, allowing verification-dependent application logic to trust unauthenticated data

Why this happens

The underlying flaw is insufficient validation of security-critical input during cryptographic verification. A JWS deserialization path treats a payload as successfully verified even when the required signature and verification key are absent. This maps primarily to CWE-347: Improper Verification of Cryptographic Signature, with related concerns involving improper input validation, incorrect security assumptions, and violation of expected verification behavior.

Potential impact

  • An attacker may bypass authentication or authorization checks that depend on JWS verification
  • Applications could accept forged identity, role, or access-control claims
  • Downstream services may process unauthenticated payloads as trusted data
  • Security audit trails and trust decisions could be misleading
  • Compromised claims may enable unauthorized actions or data exposure

General mitigation guidance

Mitigation generally focuses on making signature verification explicit, mandatory, and fail-closed.

Common defensive patterns include:

  • Rejecting JWS objects that lack a valid signature
  • Requiring an appropriate cryptographic key before treating a payload as verified
  • Enforcing an allowlist of expected algorithms and key types
  • Validating issuer, audience, expiration, and other claims after successful verification
  • Avoiding trust in deserialization results unless verification status is independently confirmed
  • Applying least privilege to identities and services that consume signed tokens
  • Using secure-by-default verification wrappers that reject unsigned or incomplete objects

These controls reduce reliance on implicit library behavior and limit the consequences of invalid token handling.

How teams detect issues like this

Organizations can look for this issue through:

  • Static analysis rules identifying JWS deserialization calls whose results are trusted without explicit signature-status checks
  • Code review signals such as optional keys, accepted unsigned objects, permissive algorithm handling, or authorization decisions based directly on decoded claims
  • Unit and integration tests covering missing signatures, absent keys, unexpected algorithms, malformed serialization, and invalid claims
  • Runtime policy enforcement that rejects unsigned or unverifiable tokens at service boundaries
  • Dependency and security review tooling that flags cryptographic verification paths requiring manual assessment

Sources

SourceLink
github.comgithub.com/authlib/authlib
kb.cert.orgkb.cert.org/vuls/id/762428
kb.cert.orgkb.cert.org/vuls/id/762428

Frequently asked

questions

It may be exploitable remotely when an application accepts attacker-controlled JWS input and relies on the affected deserialization behavior for authentication or authorization decisions.

Not necessarily. The key requirement is the ability to submit or influence a JWS object processed by the vulnerable code; application-specific access controls may affect practical reachability.

Require a valid signature and appropriate cryptographic key before accepting any payload as verified, and fail closed when the signature, key, or algorithm is missing or unexpected.

Enforce explicit verification policies, test unsigned and malformed token cases, restrict accepted algorithms and keys, and review all code paths that use decoded claims for security decisions.

Find out what's already
exploitable in your codebase.