lobehub/lobe-chat · Security
Lobe Chat API Key Leak
- GHSA ID
- GHSA-p36r-qxgx-jq2v
- CVE ID
- CVE-2024-37895
- Severity
- medium
- Published
- Updated
- CVSS
- 5.7 · CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N
- CVSS v3
- 5.7 · CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N
Description
Summary
If an attacker can successfully authenticate through SSO/Access Code, they can obtain the real backend API Key by modifying the base URL to their own attack URL on the frontend and setting up a server-side request.
Details
The attack process is described above.
PoC
Frontend:
- Pass basic authentication (SSO/Access Code).
- Set the Base URL to a private attack address.
- Configure the request method to be a server-side request.
- At the self-set attack address, retrieve the API Key information from the request headers.
Backend:
- The LobeChat version allows setting the Base URL.
- There is no outbound traffic whitelist.
Impact
All community version LobeChat users using SSO/Access Code authentication, tested on version 0.162.13.
CWEs
- CWE-200 · Exposure of Sensitive Information to an Unauthorized Actor
- CWE-918 · Server-Side Request Forgery (SSRF)