CVE-2024-37895: API Key Leak in lobe-chat

Published Jun 17, 2024
·
Updated

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.

Other sources

Lobe Chat is an open-source LLMs/AI chat framework. In affected versions 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. This issue has been addressed in version 0.162.25. Users are advised to upgrade. There are no known workarounds for this vulnerability.

— MITRE

Affected Software

2 affected componentsFixes available
npm/@lobehub/chat<0.162.25
0.162.25
lobehub Lobe Chat<0.162.25

Event History

Jun 17, 2024
CVE Published
via MITRE·07:28 PM
Data Sourced
via MITRE·07:28 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:15 PM
Affected Software
Advisory Published
via GitHub·10:28 PM

Frequently Asked Questions

1

What is the severity of CVE-2024-37895?

CVE-2024-37895 is classified as a high severity vulnerability due to its potential for unauthorized API key exposure.

2

How do I fix CVE-2024-37895?

To mitigate CVE-2024-37895, ensure that all backend API keys are securely stored and not exposed to the frontend.

3

What is the attack vector for CVE-2024-37895?

The attack vector for CVE-2024-37895 involves exploiting authenticated sessions via SSO/Access Code to access the backend API Key.

4

Which software versions are affected by CVE-2024-37895?

CVE-2024-37895 affects the @lobehub/chat package version 0.162.25 and below.

5

Can CVE-2024-37895 lead to data breaches?

Yes, exploiting CVE-2024-37895 can allow an attacker to access sensitive backend data, leading to potential data breaches.

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