CVE-2026-85725
Timing side‑channel in password verification allows password guessing via login endpoint.
- CVSS 5.9
- CWE-208
- Authentication, Authorization, and Session Management
- Remote
LightRAG provides simple and fast retrieval-augmented generation. Prior to 1.5.5, verify_password in lightrag/api/passwords.py compares plaintext AUTH_ACCOUNTS password values with Python's == operator. The comparison can return after the first mismatching byte, creating response-time differences based on password length and matching prefixes. A network attacker with sufficiently low-latency access can repeatedly query the /login endpoint and use the timing oracle to recover a plaintext-configured password character by character. Deployments using bcrypt-prefixed password values are not affected by this comparison path. This issue is fixed in version 1.5.5.
- CWE
- CWE-208
- CVSS base score
- 5.9
- Published
- 2026-09-22
- OWASP
- A07 Identification and Authentication Failures
- Orthogonal defect classification
- Timing/Serialization
- Code defect classification
- Timing Issues
- Category
- Authentication, Authorization, and Session Management
- Subcategory
- Insecure Authentication Mechanisms
- Accessibility scope
- Remote
- Impact
- Information Disclosure
- Affected component
- LightRAG
- Fixed by upgrading
- Yes
Solution
Upgrade LightRAG to version 1.5.5 (or later).
Vulnerable code sample
import hmac
AUTH_ACCOUNTS = {
"admin": "s3cr3tP@ssw0rd"
}
def verify_password(username: str, password: str) -> bool:
# VULNERABLE: uses == which leaks timing information
stored = AUTH_ACCOUNTS.get(username)
if stored is None:
return False
return stored == passwordPatched code sample
import hmac
AUTH_ACCOUNTS = {
"admin": "s3cr3tP@ssw0rd"
}
def verify_password(username: str, password: str) -> bool:
# FIX: uses constant-time compare to prevent timing leak
stored = AUTH_ACCOUNTS.get(username)
if stored is None:
return False
return hmac.compare_digest(stored, password)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.
- fix(auth): constant-time plaintext password comparison (GHSA-c759-cx9p-mrwq) (HKUDS/LightRAG)
lightrag/api/auth.py,lightrag/api/auth.py · AuthHandler.verify_password,lightrag/api/passwords.py,lightrag/api/passwords.py · verify_password
Cite this entry
@misc{vaitp:cve202685725,
title = {{Timing side‑channel in password verification allows password guessing via login endpoint.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-85725},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-85725/}}
}
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 ::
