Advisory

GHSA-p36r-qxgx-jq2v

Also known as: CVE-2024-37895

Summary

Lobe Chat API Key Leak

Details

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.

image

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2024-06-17 22:28 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

@lobehub/chat

npm · All systems

Affected

  • introduced 0, fixed 0.162.25 (semver)

Fixed versions

0.162.25

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences