VAITP Dataset

← Back to the dataset

CVE-2026-102269

Base64URL decode accepts extra chars, enabling signature bypass.

  • CVSS 5.4
  • CWE-180
  • Input Validation and Sanitization
  • Remote

PyJWT is a Python implementation of JSON Web Token standards. Prior to 2.14.0, PyJWT signature segment is affected because signature segment decoding accepts characters outside the canonical Base64URL representation. This occurs when non-Base64URL characters are appended to a valid compact JWS signature segment. As a result, base64url_decode produces the same signature bytes for different serialized segments. Consequently, raw-token revocation checks can fail to recognize an equivalent modified token. This issue is fixed in version 2.14.0.

CVSS base score
5.4
Published
2026-09-28
OWASP
A02 Cryptographic Failures
Orthogonal defect classification
Checking
Code defect classification
Incorrect Check
Category
Input Validation and Sanitization
Subcategory
Insecure Parsing or Deserialization
Accessibility scope
Remote
Impact
Unauthorized Access
Affected component
PyJWT
Fixed by upgrading
Yes

Solution

Upgrade PyJWT to version 2.14.0 or later.

Vulnerable code sample

import jwt

def extract_signature(token: str) -> bytes:
    # VULNERABLE: accepts non‑Base64URL characters in the signature segment
    header, payload, sig = token.split('.')
    return jwt.utils.base64url_decode(sig)

Patched code sample

import jwt
import re

def extract_signature(token: str) -> bytes:
    # FIX: filter out characters outside the Base64URL alphabet before decoding
    header, payload, sig = token.split('.')
    clean_sig = re.sub(r'[^A-Za-z0-9_-]', '', sig)
    return jwt.utils.base64url_decode(clean_sig)

Published fix

Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.

Cite this entry

@misc{vaitp:cve2026102269,
  title        = {{Base64URL decode accepts extra chars, enabling signature bypass.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-102269},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-102269/}}
}

Download this entry as JSON Download the whole dataset

Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.