CVE-2026-59163
Auth bypass: JWT signature verification disabled, allowing any token.
- CVSS 9.1
- 347
- Authentication, Authorization, and Session Management
- Remote
Mnemosyne is a memory layer for artificial intelligence agents. Prior to v3.10.1, the auth check in mnemosyne/core/sync_server.py parsed the JWT's header and payload using base64 decoding, then passed the token to a jwt library call with options that effectively disabled signature verification. The server accepted any well-formed token regardless of the signature, including tokens with alg: none and tokens signed with the wrong key. The fix in v3.10.1 replaces the broken decode with a from-scratch HS256 verifier using only the Python standard library. For users who cannot upgrade immediately, restrict network access to the sync server endpoint to trusted clients only. Firewall, reverse proxy with mTLS, or localhost bind with SSH tunnel are all viable. The vulnerability is not exploitable against an unreachable endpoint.
- CWE
- 347
- CVSS base score
- 9.1
- Published
- 2026-09-18
- OWASP
- A07 Identification and Authentication Failures
- Orthogonal defect classification
- Checking
- Code defect classification
- Incorrect Check
- Category
- Authentication, Authorization, and Session Management
- Subcategory
- Insecure Authentication Mechanisms
- Accessibility scope
- Remote
- Impact
- Unauthorized Access
- Affected component
- Python
- Fixed by upgrading
- Yes
Solution
Upgrade to mnemosyne v3.10.1 or later.
Vulnerable code sample
import base64
import json
import jwt # PyJWT library
def verify_token(token: str, secret: str) -> bool:
# VULNERABLE: disables signature verification
header_b64, payload_b64, signature_b64 = token.split('.')
header = json.loads(base64.urlsafe_b64decode(header_b64 + '=='))
payload = json.loads(base64.urlsafe_b64decode(payload_b64 + '=='))
# Decode with verification disabled
try:
jwt.decode(token, options={"verify_signature": False})
return True
except jwt.InvalidTokenError:
return FalsePatched code sample
import base64
import json
import hmac
import hashlib
def verify_token(token: str, secret: str) -> bool:
# FIX: proper HS256 signature verification
try:
header_b64, payload_b64, signature_b64 = token.split('.')
signing_input = f"{header_b64}.{payload_b64}".encode()
signature = base64.urlsafe_b64decode(signature_b64 + '==')
expected_sig = hmac.new(secret.encode(), signing_input, hashlib.sha256).digest()
if not hmac.compare_digest(signature, expected_sig):
return False
json.loads(base64.urlsafe_b64decode(header_b64 + '==')) # ensure valid JSON
json.loads(base64.urlsafe_b64decode(payload_b64 + '=='))
return True
except Exception:
return FalsePayload
__VAITP_MODEL_REFUSED__
Cite this entry
@misc{vaitp:cve202659163,
title = {{Auth bypass: JWT signature verification disabled, allowing any token.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-59163},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-59163/}}
}
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 ::
