Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. authlib
  4. ›
  5. CVE-2026-28490

CVE-2026-28490: Authlib Vulnerable to JWE RSA1_5 Bleichenbacher Padding Oracle

March 16, 2026

A cryptographic padding oracle vulnerability was identified in the Authlib Python library concerning the implementation of the JSON Web Encryption (JWE) RSA1_5 key management algorithm. Authlib registers RSA1_5 in its default algorithm registry without requiring explicit opt-in, and actively destroys the constant-time Bleichenbacher mitigation that the underlying cryptography library implements correctly.

When cryptography encounters an invalid PKCS#1 v1.5 padding, it returns a randomized byte string instead of raising an exception — the correct behavior per RFC 3218 §2.3.2. Authlib ignores this contract and raises ValueError('Invalid "cek" length') immediately after decryption, before reaching AES-GCM tag validation. This creates a clean, reliable Exception Oracle:

  • Invalid padding → cryptography returns random bytes → Authlib length check fails → ValueError: Invalid "cek" length
  • Valid padding, wrong MAC → decryption succeeds → length check passes → AES-GCM fails → InvalidTag

This oracle is active by default in every Authlib installation without any special configuration by the developer or the attacker. The three most widely used Python web frameworks — Flask, Django, and FastAPI — all expose distinguishable HTTP responses for these two exception classes in their default configurations, requiring no additional setup to exploit.

Empirically confirmed on authlib 1.6.8 + cryptography 46.0.5:

[PADDING INVALIDO]     ValueError: Invalid "cek" length
[PADDING VALIDO/MAC]   InvalidTag

References

  • github.com/advisories/GHSA-7432-952r-cw78
  • github.com/authlib/authlib
  • github.com/authlib/authlib/commit/48b345f29f6c459f11c6a40162b6c0b742ef2e22
  • github.com/authlib/authlib/releases/tag/v1.6.9
  • github.com/authlib/authlib/security/advisories/GHSA-7432-952r-cw78
  • nvd.nist.gov/vuln/detail/CVE-2026-28490

Code Behaviors & Features

Detect and mitigate CVE-2026-28490 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 1.6.9

Fixed versions

  • 1.6.9

Solution

Upgrade to version 1.6.9 or above.

Impact 6.5 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-203: Observable Discrepancy
  • CWE-327: Use of a Broken or Risky Cryptographic Algorithm

Source file

pypi/authlib/CVE-2026-28490.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:12 +0000.