CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-85725

CVE-2026-85725: Observable Timing Side-Channel Vulnerability in HKUDS LightRAG

Amit Schendel
Amit Schendel
Senior Security Researcher

Sep 23, 2026·5 min read·15 visits

Executive Summary (TL;DR)

Unauthenticated remote timing side-channels in HKUDS LightRAG authentication logic permit username enumeration and plaintext password recovery.

HKUDS LightRAG prior to version 1.5.5 is vulnerable to multiple timing side-channels (CWE-208) in its API authentication layer. The password verification logic in `lightrag/api/passwords.py` compares plaintext administrative credentials using Python's short-circuiting equality operator (`==`). Additionally, `lightrag/api/auth.py` terminates authentication early on non-existent usernames, creating an observable latency difference compared to computationally expensive bcrypt comparisons on valid accounts. Together, these allow remote unauthenticated attackers with low-latency network access to enumerate valid usernames and extract plaintext passwords character by character.

Vulnerability Overview

HKUDS LightRAG is an open-source framework designed for fast, retrieval-augmented generation (RAG) using large language models. To restrict access to administrative functions, the application exposes API endpoints protected by basic token authentication. The credentials are defined using the AUTH_ACCOUNTS configuration parameter.

Prior to version 1.5.5, the authentication mechanism exposed two major security weaknesses. The primary weakness (CWE-208) resides in the password verification routines, which compare plaintext administrative password strings without a constant-time algorithm. A secondary weakness allows an external attacker to reliably determine valid usernames by analyzing the processing time of authentication requests, bypass the primary layer, and recover plaintext credentials.

Root Cause Analysis

The vulnerability stems from two independent implementation details within the authentication layer. First, lightrag/api/passwords.py relies on Python's default equality operator (==) to match supplied passwords against stored plaintext values.

Python's string and byte equality checks optimize comparison performance using two techniques:

  1. Length Verification: If the lengths of the two strings differ, the execution returns False immediately.
  2. Short-Circuit Comparison: If the lengths match, the interpreter iterates sequentially through characters. When the first mismatching character is identified, it ceases processing and yields False.

Because of this short-circuiting behavior, the execution latency is directly proportional to the number of matching characters in the user's input. A guess that matches the first three characters of a password will take slightly longer to fail than a guess that mismatch on the first character.

Second, the authentication handler in lightrag/api/auth.py evaluates whether the user exists prior to executing password checking. When bcrypt hashing is enabled, verifying a valid user triggers bcrypt.checkpw, which executes in roughly 100 milliseconds. If the username does not exist, the routine returns False immediately in microseconds. This large difference in latency allows external observers to enumerate valid usernames.

Code-Level Analysis and Patch Walkthrough

In the vulnerable version of the codebase, password verification was implemented as a direct equality operation:

# Vulnerable implementation in lightrag/api/passwords.py
def verify_password(plain_password: str, stored_password: str) -> bool:
    # ...
    return stored_password == plain_password

This behavior is fixed in the patch by utilizing Python's hmac.compare_digest function. The corrected implementation enforces constant-time byte comparisons by processing the full length of the byte strings:

# Patched implementation in lightrag/api/passwords.py
import hmac
 
def verify_password(plain_password: str, stored_password: str) -> bool:
    # ...
    return hmac.compare_digest(
        stored_password.encode("utf-8"), plain_password.encode("utf-8")
    )

Additionally, the username enumeration side-channel was resolved in lightrag/api/auth.py by integrating a dummy verification mechanism. If a username does not exist in the store, the application executes a verification pass against a static, synthetic bcrypt hash (_DUMMY_VERIFY_SPEC). This forces the server to spend identical computational time on invalid accounts:

# Patched implementation in lightrag/api/auth.py
_DUMMY_VERIFY_SPEC = (
    BCRYPT_PASSWORD_PREFIX
    + "$2b$12$ilI0sY2jGfy4h0AVtn6WuutU6BFwzZq5MVvrQYY9fbyQ59NI2NBKa"
)
 
def verify_password(self, username: str, plain_password: str) -> bool:
    stored_password = self.accounts.get(username)
    if stored_password is None:
        # Execute dummy verification to equalize execution time
        verify_password(plain_password, _DUMMY_VERIFY_SPEC)
        return False
 
    return verify_password(plain_password, stored_password)

Exploitation Methodology

To exploit these vulnerabilities, an attacker needs a network path with minimal jitter, such as co-location inside the same cloud region or container infrastructure. The attack is carried out in two distinct phases:

Phase 1: Username Enumeration

An attacker sends repetitive requests containing different candidate usernames to the /login endpoint. By sorting the returned network latencies, usernames that delay response times by roughly 100 milliseconds are marked as valid administrative accounts on systems configured with bcrypt.

Phase 2: Password Extraction

Once a username is validated, the attacker attacks the plaintext comparison routine:

  1. The attacker determines the password length by testing arbitrary inputs of increasing sizes. The input length matching the target password exhibits a statistically higher response time due to the subsequent character comparisons.
  2. The attacker iterates through characters for each index position. If the password is admin123 and the attacker sends aaaa, it fails immediately at index 0. Sending axxx fails at index 1, which requires slightly more time. Analyzing the latency distributions over a high number of requests isolates the correct character prefix, eventually reconstructing the credential.

Security Impact Assessment

A successful attack compromises the confidentiality of administrative credentials for the LightRAG framework. This vulnerability possesses a CVSS 3.1 rating of 5.9 (Medium) with the vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N.

The attack complexity is designated as High (AC:H) because measuring sub-millisecond differences over a network requires precise statistical analysis, filtering algorithms, and low network latency. However, in containerized or shared network architectures, these requirements are met. Compromise of administrative passwords grants attackers write and read capabilities over the retrieval-augmented generation engine, including the ability to manipulate indexed documentation, execute prompt injections, and poison generative AI outputs.

Remediation and Defensive Engineering

The primary resolution is to upgrade HKUDS LightRAG to version 1.5.5 or higher, which integrates the constant-time comparisons and the dummy bcrypt executions.

Additionally, administrators must configure their deployment's passwords securely. When storing accounts in the AUTH_ACCOUNTS configurations, passwords must be formatted using cryptographic bcrypt hashes prefixed with the {bcrypt} tag. Plaintext values are discouraged, as any deployment storing unhashed passwords remains vulnerable to local configuration leakage and other password-recovery mechanisms.

Fix Analysis (1)

Technical Appendix

CVSS Score
5.9/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

Affected Systems

HKUDS LightRAG

Affected Versions Detail

Product
Affected Versions
Fixed Version
LightRAG
HKUDS
< 1.5.51.5.5
AttributeDetail
CWE IDCWE-208: Observable Timing Discrepancy
Attack VectorNetwork (Low-latency / High-precision)
CVSS v3.15.9 (Medium)
Exploit StatusProof-of-Concept
KEV StatusNot Listed
ImpactAdministrative Credential Recovery & Username Enumeration

MITRE ATT&CK Mapping

T1110.001Brute Force: Password Guessing
Credential Access
CWE-208
Observable Timing Discrepancy

The product performs an operation that takes a variable amount of time, and the security of the operation is dependent on that operation being completed in a constant amount of time.

References & Sources

  • [1]GitHub Security Advisory GHSA-c759-cx9p-mrwq
  • [2]HKUDS LightRAG Official Pull Request 3423
  • [3]HKUDS LightRAG Release Version v1.5.5
  • [4]NVD Record for CVE-2026-85725

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•GHSA-VGHH-5RFX-XHQ8
9.9

CVE-2026-48749: Arbitrary Host File Read and Write via Malicious Image Symlink in Canonical LXD and Incus

CVE-2026-48749 (tracked as GHSA-vghh-5rfx-xhq8 for LXD and GHSA-2q3f-q5pq-g8wv for Incus) is a critical container escape vulnerability in the Canonical LXD and Linux Containers Incus system container managers. By importing a specially crafted container image archive containing duplicate tar member headers, an authenticated attacker can replace the instance rootfs directory with a symbolic link pointing to the underlying host root filesystem. When performing file operations on a stopped container, the privileged forkfile helper binary resolves the symbolic link without confinement and chroots directly into the host filesystem, granting arbitrary root-level file read and write access.

Amit Schendel
Amit Schendel
2 views•9 min read
•about 2 hours ago•GHSA-FMC8-P6Q7-75CC
9.9

GHSA-fmc8-p6q7-75cc: Argument Injection in Canonical LXD Backup Compression Leads to Host Root Code Execution

GHSA-fmc8-p6q7-75cc (associated with CVE-2026-48755) is a critical argument injection vulnerability in Canonical LXD (github.com/canonical/lxd). The vulnerability occurs during instance and storage volume backup operations when processing the user-supplied compression_algorithm configuration parameter. While LXD validates the primary executable token against an allowlist of supported compression binaries, it fails to sanitize or restrict subsequent tokens parsed via shellquote.Split. These additional arguments are passed directly to exec.Command. An authenticated attacker with privileges to trigger backups can inject command-line flags for utilities like zstd to read staged files from a container filesystem and write them to arbitrary paths on the underlying host filesystem, such as /etc/cron.d/, achieving root-level arbitrary code execution on the host.

Amit Schendel
Amit Schendel
6 views•10 min read
•about 3 hours ago•GHSA-PJFF-C2WC-F6JM
9.9

CVE-2026-48769: Arbitrary File Write and Remote Code Execution via Trusted Image Hash in Canonical LXD and Linux Containers Incus

A critical path traversal vulnerability caused by improper input validation (CWE-20) exists in the direct image download handler of Canonical LXD and Linux Containers Incus. When an authenticated user requests an image import using the URL source type, the daemon reads the image fingerprint from an untrusted HTTP response header (`Incus-Image-Hash` or `LXD-Image-Hash`) without validating that it conforms to a SHA-256 format. This unvalidated string is concatenated directly into a filesystem path via `filepath.Join` prior to file creation and cryptographic verification, allowing directory traversal sequences to write arbitrary files on the host filesystem as root.

Alon Barad
Alon Barad
7 views•10 min read
•about 7 hours ago•CVE-2026-9639
6.5

CVE-2026-9639: Authenticated Denial of Service via Nil-Pointer Dereference in Canonical LXD Custom Volume Backup Import

CVE-2026-9639 (GHSA-j93m-3j9p-m5m8) is a null pointer dereference vulnerability in Canonical LXD affecting versions 5.0.0 through 5.21.4 and 6.0 through 6.8. The flaw resides in the (*lxdBackend).CreateCustomVolumeFromBackup method within lxd/storage/backend_lxd.go. An authenticated attacker with the can_create_storage_volumes permission can upload a crafted custom volume backup tarball that omits the expires_at field on a snapshot entry, triggering an unhandled SIGSEGV panic and terminating the LXD daemon.

Amit Schendel
Amit Schendel
6 views•9 min read
•about 8 hours ago•CVE-2026-33050
8.8

CVE-2026-33050: OS Command Injection in GeoNode Vector Upload Handler

An operating system command injection vulnerability (CWE-78) exists in GeoNode versions prior to 5.1.0. The vulnerability occurs in the vector upload processing pipeline when handling user-supplied geospatial files. By supplying a crafted layer name containing shell metacharacters, an authenticated attacker with basic data upload privileges can execute arbitrary commands on the underlying server or container hosting the GeoNode application and Celery worker processes.

Alon Barad
Alon Barad
6 views•9 min read
•about 9 hours ago•CVE-2026-46429
5.5

CVE-2026-46429: Unrestricted File Upload and Validation Bypass in GeoNode

GeoNode versions prior to 5.0.3 contain an unrestricted file upload vulnerability (CWE-434) within the document and dataset ingestion architecture. Authenticated low-privileged users can bypass upload validation via direct REST API interactions, file extension masquerading, metadata mutation via PATCH requests, or malicious archive submissions. This allows attackers to store and serve dangerous file types, alter on-disk file references, or trigger path traversal and resource exhaustion during archive extraction.

Amit Schendel
Amit Schendel
7 views•10 min read