GitHub Advisoryadvisory · npm

GHSA-p36r-qxgx-jq2v Lobe Chat API Key Leak

MEDIUM Published 2024-06-17 Modified 2024-06-17 Official page ↗
Aliases
CVE-2024-37895
Ecosystem
npm
Packages
@lobehub/chat
Severity
Moderate
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N
Weaknesses
CWE-200, CWE-918
Reviewed
2024-06-17

Affected packages

• npm @lobehub/chat: < 0.162.25 → fixed in 0.162.25

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: 1. Pass basic authentication (SSO/Access Code). 2. Set the Base URL to a private attack address. 3. Configure the request method to be a server-side request. 4. At the self-set attack address, retrieve the API Key information from the request headers. Backend: 1. The LobeChat version allows setting the Base URL. 2. There is no outbound traffic whitelist. Impact All community version LobeChat users using SSO/Access Code authentication, tested on version 0.162.13.

Related

Alias · CVE (1)

  • CVE-2024-37895 Lobe Chat is an open-source LLMs/AI chat framework. vulnerability

Weakness · CWE (2)

  • CWE-200 Exposure of Sensitive Information to an Unauthorized Actor weakness
  • CWE-918 Server-Side Request Forgery weakness

References