Browse / AI Framework and Platform Flaws / GHSA-69x8-hrgq-fjj8
LiteLLM: Password hash exposure and pass-the-hash authentication bypass
- Class
- AI Framework and Platform Flaws (filed by a model that read the advisory)
- Technique
- Authentication and access control
- Also involves
- Sensitive Data Disclosure
- Affected
- litellm (PyPI)
- Gets past
- Authentication check
- CVSS
- CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
How it works, in short
User endpoints return stored password hashes to any authenticated user, and login accepts that hash in place of the password, allowing account takeover. (Our summary, written by a model. The source text is below.)
Details
Impact
Three issues combine into a full authentication bypass chain:
- Weak hashing: User passwords are stored as unsalted SHA-256 hashes, making them vulnerable to rainbow table attacks and trivially identifying users with identical passwords.
- Hash exposure: Multiple API endpoints (/user/info, /user/update, /spend/users) return the password hash field in responses to any authenticated user regardless of role. Plaintext passwords could also potentially be exposed in certain scenarios.
- Pass-the-hash: The /v2/login endpoint accepts the raw SHA-256 hash as a valid password without re-hashing, allowing direct login with a stolen
An already authenticated user can retrieve another user's password hash from the API and use it to log in as that user. This enables full privilege escalation in three HTTP requests.
Patches
Fixed in v1.83.0. Passwords are now hashed with scrypt (random 16-byte salt, n=16384, r=8, p=1). Password hashes are stripped from all API responses. Existing SHA-256 hashes are transparently migrated on next login.
References
- https://github.com/BerriAI/litellm/security/advisories/GHSA-69x8-hrgq-fjj8
- https://github.com/BerriAI/litellm
Source: GitHub Advisory Database, used under CC BY 4.0.