CVE-2024-24566: @lobehub/chat vulnerable to unauthorized access to plugins
LobeChat (@lobehub/chat) 0.122.3 and earlier does not check the ACCESS_CODE on its plugin gateway, POST /api/plugin/gateway. Anyone who can reach a password-protected instance can call chat plugins without the password. Upgrade to @lobehub/chat 0.122.4.
Published Jan 31, 2024 · Analysis Nov 2, 2026
What an attacker can do
LobeChat can be deployed with an ACCESS_CODE environment variable, which gates the chat UI behind a password. The plugin gateway route in src/app/api/plugin/gateway/route.ts exported the gateway handler directly and never compared the request's access code to the configured one.
The researcher's proof of concept sends a POST to /api/plugin/gateway on a Docker deployment started with -e ACCESS_CODE=TEST123. The body names a plugin (WeatherGPT), a function call and its manifest. The server answers 200 with live weather data, with no password supplied.
The attacker needs only network access to port 3210 or whatever port the app uses. They can run plugin calls using the manifest they send. The advisory rates impact as unauthorized access to plugins, with low integrity impact and no confidentiality or availability effect. The gateway fetches the plugin API named in the manifest, so an exposed instance can be used as a request relay. The sources do not describe that further.
Who is affected
@lobehub/chat up to and including 0.122.3 on instances that rely on ACCESS_CODE to protect the app. Instances without an access code were open anyway.
Check the version from a source or npm install:
npm ls @lobehub/chatFor Docker, check the image tag:
docker inspect lobe-chat --format '{{.Config.Image}}'@lobehub/chat
- Ecosystem
- npm
- Affected
- <= 0.122.3
- Fixed in
- 0.122.4
- Check
npm ls @lobehub/chat
How to fix it
Upgrade to @lobehub/chat 0.122.4 or later. For Docker, pull a newer lobehub/lobe-chat image and recreate the container:
docker pull lobehub/lobe-chatThe fix wraps the gateway in a POST function that runs a new checkAuth first. It compares the request's access code with ACCESS_CODES, and returns InvalidAccessCode when the code is missing or wrong. The client now sends the auth headers with gateway requests. The advisory names no workaround besides verifying the code on /api/plugin routes, for example in a reverse proxy.
How to tell if you were hit
Check access logs for POST /api/plugin/gateway requests from addresses that never loaded the UI, or that carry no access-code header. Compare them with your users' sessions. On patched versions the route returns an InvalidAccessCode error to such calls. Also review outbound requests from the LobeChat container to plugin hosts you do not recognise.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Description:
When the application is password-protected (deployed with the ACCESS_CODE option), it is possible to access plugins without proper authorization (without password).
Proof-of-Concept:
Let’s suppose that application has been deployed with following command:
Due to the utilization of the `ACCESS_CODE`, access to the chat is possible only after entering the password:

However, it is possible to interact with chat plugins without entering the `ACCESS_CODE`.
Example HTTP request:POST /api/plugin/gateway HTTP/1.1 Host: localhost:3210 Content-Length: 1276
{"apiName":"checkWeatherUsingGET","arguments":"{\n \"location\": \"London\"\n}","identifier":"WeatherGPT","type":"default","manifest":{"api":[{"description":"Get current weather information","name":"checkWeatherUsingGET","parameters":{"properties":{"location":{"type":"string"}},"required":["location"],"type":"object"}}],"homepage":"https://weathergpt.vercel.app/legal","identifier":"WeatherGPT","meta":{"avatar":"https://openai-collections.chat-plugin.lobehub.com/weather-gpt/logo.webp","description":"Get current weather information for a specific location.","title":"WeatherGPT"},"openapi":"https://openai-collections.chat-plugin.lobehub.com/weather-gpt/openapi.json","systemRole":"Use the WeatherGPT plugin to automatically fetch current weather information for a specific location when it's being generated by the ChatGPT assistant. The plugin will return weather data, including temperature, wind speed, humidity, and other relevant information, as well as a link to a page that has all the information. Links will always be returned and should be shown to the user. The weather data can be used to provide users with up-to-date and accurate weather information for their desired location.","type":"default","version":"1","settings":{"properties":{},"type":"object"}}}
HTTP response:HTTP/1.1 200 OK [...] {"location":{"name":"London","region":"City of London, Greater London","country":"United Kingdom","lat":51.52,"lon":-0.11,"tz_id":"Europe/London","localtime_epoch":1706379026,"localtime":"2024-01-27 18:10"},"current":{"last_updated_epoch":1706378400,"last_updated":"2024-01-27 18:00","temp_c":6,"temp_f":42.8,"is_day":0,"condition":{"text":"Clear","icon":"//cdn.weatherapi.com/weather/64x64/night/113.png","code":1000},"wind_mph":4.3,"wind_kph":6.8,"wind_degree":170,"wind_dir":"S","pressure_mb":1031,"pressure_in":30.45,"precip_mm":0,"precip_in":0,"humidity":81,"cloud":0,"feelslike_c":3.8,"feelslike_f":38.9,"vis_km":10,"vis_miles":6,"uv":1,"gust_mph":9.5,"gust_kph":15.3},"infoLink":"https://weathergpt.vercel.app/London"}
### Remediation:
Verify the `ACCESS_CODE` for HTTP requests to the `/api/plugin/:` route.
### Impact:
Unauthorized access to plugins.Credited to dastaj.
Questions
- Does setting ACCESS_CODE protect me on 0.122.3?
Not for plugins. The chat UI asks for the code, but POST /api/plugin/gateway answered without it. Upgrade to 0.122.4.
- Can the attacker read my chats or API key?
The advisory describes unauthorized plugin access only, with low integrity impact and no confidentiality impact. The sources do not report access to chat history or the OpenAI key.
- Which version fixes CVE-2024-24566?
@lobehub/chat 0.122.4. Version 0.122.3 and earlier are listed as vulnerable.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More LobeChat vulnerabilities
All LobeChat entriesCVE-2026-23835
LobeHub Vulnerable to Improper Authorization in Presigned Upload
medium5.7Feb 1, 2026CVE-2026-23522
Lobe Chat has IDOR in Knowledge Base File Removal that Allows Cross User File Deletion
low3.7No fixJan 20, 2026CVE-2026-23733
Lobe Chat affected by Cross-Site Scripting(XSS) that can escalate to Remote Code Execution(RCE)
critical9.6No fixJan 20, 2026CVE-2025-62505
Lobe Chat vulnerable to Server-Side Request Forgery with native web fetch module
low3.0Oct 17, 2025CVE-2025-59426
lobe-chat has an Open Redirect
medium4.3Sep 24, 2025CVE-2025-59417
Lobe Chat Desktop vulnerable to Remote Code Execution via XSS in Chat Messages
medium6.8Sep 18, 2025
