{"id":"CVE-2024-37895","aliases":["GHSA-p36r-qxgx-jq2v"],"url":"https://o3.security/vulnerability/CVE-2024-37895","summary":"API Key Leak in lobe-chat","details":"### Summary\n\nIf an attacker can successfully authenticate through SSO/Access Code, they can obtain the real backend API Key by modifying the base URL to their own attack URL on the frontend and setting up a server-side request.\n\n### Details\n\nThe attack process is described above.\n\n![image](https://github.com/lobehub/lobe-chat/assets/36695271/df5e0c3c-af28-45c3-959f-182cc9d06680)\n\n### PoC\n\nFrontend:\n1. Pass basic authentication (SSO/Access Code).\n2. Set the Base URL to a private attack address.\n3. Configure the request method to be a server-side request.\n4. At the self-set attack address, retrieve the API Key information from the request headers.\n\nBackend:\n1. The LobeChat version allows setting the Base URL.\n2. There is no outbound traffic whitelist.\n\n### Impact\n\nAll community version LobeChat users using SSO/Access Code authentication, tested on version 0.162.13.","published":"2024-06-17T19:28:31.021Z","modified":"2026-08-27T03:57:02.175293004Z","cvss":{"score":5.7,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N"},"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"@lobehub/chat","fixedVersion":"0.162.25"}],"fix":null,"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/37xxx/CVE-2024-37895.json"},{"type":"ADVISORY","url":"https://github.com/lobehub/lobe-chat/security/advisories/GHSA-p36r-qxgx-jq2v"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-37895"},{"type":"PACKAGE","url":"https://github.com/lobehub/lobe-chat"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-27T03:57:02.175293004Z"}}