CVE-2025-59426: @lobehub/chat Lobe-chat Has An Open Redirect Vulnerability
MODERATECVE-2025-59426 is a MODERATE (CVSS 4.3) lobe-chat has an open redirect vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting @lobehub/chat libraries in the npm ecosystem. The issue involves lobe-chat has an open redirect. Remediation is available by upgrading affected packages to version 1.130.1.
CVE-2025-59426 at a Glance
Security Impact
CVSS: 4.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N).
How to Fix CVE-2025-59426
To remediate this vulnerability, upgrade all affected @lobehub/chat dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @lobehub/chat@1.130.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @lobehub/chat
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-59426, inspect your project dependencies using npm:
npm ls @lobehub/chat
Analyze the terminal output to locate any version of @lobehub/chat in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.130.1), your application is affected.
Note: The npm ls @lobehub/chat command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In @lobehub/chat, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-59426 Affected @lobehub/chat Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@lobehub/chat
|
npm |
< 1.130.1
|
1.130.1
|
References
Frequently Asked Questions
What is CVE-2025-59426?
Which @lobehub/chat versions are affected?
What version fixes CVE-2025-59426?
Is @lobehub/chat affected?
What is the CVSS score of CVE-2025-59426?
What CWE is associated with CVE-2025-59426?
How can I check npm dependencies for CVE-2025-59426?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xph5-278p-26qx",
"modified" : "2025-10-13T15:56:03Z",
"published" : "2025-09-24T21:34:10Z",
"aliases" : [ "CVE-2025-59426" ],
"summary" : "lobe-chat has an Open Redirect",
"details" : "### **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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@lobehub/chat"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.130.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/lobehub/lobe-chat/security/advisories/GHSA-xph5-278p-26qx"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-59426"
}, {
"type" : "WEB",
"url" : "https://github.com/lobehub/lobe-chat/commit/70f52a3c1fadbd41a9db0e699d1e44d9965de445"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/lobehub/lobe-chat"
}, {
"type" : "WEB",
"url" : "https://github.com/lobehub/lobe-chat/blob/aa841a3879c30142720485182ad62aa0dbd74edc/src/app/(backend)/oidc/consent/route.ts#L113-L127"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-601" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-09-24T21:34:10Z",
"nvd_published_at" : "2025-09-25T14:15:45Z"
}
}