{"id":"CVE-2025-59426","aliases":["CVE-2025-59426","GHSA-xph5-278p-26qx"],"related":[],"kind":"vulnerability","state":"published","title":"lobe-chat has an Open Redirect","summary":"Lobe Chat is an open-source artificial intelligence chat framework. Prior to version 1.130.1, the project's OIDC redirect handling logic constructs the host and protocol of the final redirect URL based on the X-Forwarded-Host or Host headers and the X-Forwarded-Proto value. In deployments where a reverse proxy forwards client-supplied X-Forwarded-* headers to the origin as-is, or where the origin trusts them without validation, an attacker can inject an arbitrary host and trigger an open redirect that sends users to a malicious domain. This issue has been patched in version 1.130.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Lobe Chat is an open-source artificial intelligence chat framework. Prior to version 1.130.1, the project's OIDC redirect handling logic constructs the host and protocol of the final redirect URL based on the X-Forwarded-Host or Host headers and the X-Forwarded-Proto value. In deployments where a reverse proxy forwards client-supplied X-Forwarded-* headers to the origin as-is, or where the origin trusts them without validation, an attacker can inject an arbitrary host and trigger an open redirect that sends users to a malicious domain. This issue has been patched in version 1.130.1.","source":"cvelist"},{"lang":"en","text":"### **Description**\n\n---\n\n> Vulnerability Overview\n> \n\nThe project's OIDC redirect handling logic constructs the host and protocol of the final redirect URL based on the X-Forwarded-Host or Host headers and the X-Forwarded-Proto value. In deployments where a reverse proxy forwards client-supplied X-Forwarded-* headers to the origin as-is, or where the origin trusts them without validation, an attacker can inject an arbitrary host and trigger an open redirect that sends users to a malicious domain.\n\n> Vulnerable Code Analysis\n> \n\n```bash\nconst internalRedirectUrlString = await oidcService.getInteractionResult(uid, result);\nlog('OIDC Provider internal redirect URL string: %s', internalRedirectUrlString);\n\nlet finalRedirectUrl;\ntry {\n  finalRedirectUrl = correctOIDCUrl(request, new URL(internalRedirectUrlString));\n} catch {\n  finalRedirectUrl = new URL(internalRedirectUrlString);\n  log('Warning: Could not parse redirect URL, using as-is: %s', internalRedirectUrlString);\n}\n\nreturn NextResponse.redirect(finalRedirectUrl, {\n  headers: request.headers,\n  status: 303,\n});\n```\n\nhttps://github.com/lobehub/lobe-chat/blob/aa841a3879c30142720485182ad62aa0dbd74edc/src/app/(backend)/oidc/consent/route.ts#L113-L127\n\n### PoC\n\n---\n\n> curl Example\n> \n\n```bash\ncurl -i 'http://localhost:3210/oidc/callback/desktop?code=abc&state=test123' \\\n  -H 'X-Forwarded-Host: google.com' \\\n  -H 'X-Forwarded-Proto: https'\n```\n\n<img width=\"1504\" height=\"304\" alt=\"image\" src=\"https://github.com/user-attachments/assets/b71d937d-7be2-49db-8f3d-e07371912800\" />\n\n\n### Impact\n\n---\n\n- It can force users to redirect to untrusted external domains, leading to subsequent attacks such as phishing, credential harvesting, and session fixation.\n- It can disrupt the OAuth/OIDC flow user experience by redirecting users to malicious domains disguised as legitimate pages (even though this path doesn't directly include tokens, it can be exploited for social engineering attacks through redirect chains).\n- The impact can be amplified when redirect chains are combined with other vulnerabilities such as CSP bypass or cache poisoning.","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.130.1, la lógica de manejo de redirecciones OIDC del proyecto construye el host y el protocolo de la URL de redirección final basándose en los encabezados X-Forwarded-Host o Host y el valor X-Forwarded-Proto. En implementaciones donde un proxy inverso reenvía los encabezados X-Forwarded-* proporcionados por el cliente al origen tal cual, o donde el origen los confía sin validación, un atacante puede inyectar un host arbitrario y desencadenar una redirección abierta que envía a los usuarios a un dominio malicioso. Este problema ha sido parcheado en la versión 1.130.1.","source":"nvd"}],"published":"2025-09-24T21:34:10.000Z","modified":"2026-10-11T20:10:00.200Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","score":4.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","score":4.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-601"],"affected":[{"ranges":[{"version":"< 1.130.1","status":"affected"}],"vendor":"lobehub","product":"lobe-chat","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.130.1"}],"ecosystem":"npm","package":"@lobehub/chat","purl":"pkg:npm/%40lobehub/chat","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.130.1"}],"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-xph5-278p-26qx","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/lobehub/lobe-chat/commit/70f52a3c1fadbd41a9db0e699d1e44d9965de445","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/lobehub/lobe-chat/blob/aa841a3879c30142720485182ad62aa0dbd74edc/src/app/(backend)/oidc/consent/route.ts#L113-L127","tags":["product","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-59426","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":"2025-09-25T14:18:07.599Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-59426","url":"https://www.cve.org/CVERecord?id=CVE-2025-59426","licence":"CVE Terms of Use","modified":"2025-09-25T14:18:27.175Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-xph5-278p-26qx","url":"https://github.com/advisories/GHSA-xph5-278p-26qx","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:29.032Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-59426","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-59426","licence":"Public domain","modified":"2026-10-11T20:10:00.200Z"}],"updatedAt":"2026-11-25T22:59:05.158Z","epss":{"score":0.00369,"percentile":0.32747,"date":"2026-12-01T12:00:22.000Z"}}