CVE-2025-59426

CVE-2025-59426 is a medium-severity open redirect vulnerability in @lobehub/chat (npm), affecting versions < 1.130.1. It is fixed in 1.130.1.

Summary

Description

Vulnerability Overview

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.

Vulnerable Code Analysis

const internalRedirectUrlString = await oidcService.getInteractionResult(uid, result);
log('OIDC Provider internal redirect URL string: %s', internalRedirectUrlString);

let finalRedirectUrl;
try {
  finalRedirectUrl = correctOIDCUrl(request, new URL(internalRedirectUrlString));
} catch {
  finalRedirectUrl = new URL(internalRedirectUrlString);
  log('Warning: Could not parse redirect URL, using as-is: %s', internalRedirectUrlString);
}

return NextResponse.redirect(finalRedirectUrl, {
  headers: request.headers,
  status: 303,
});

https://github.com/lobehub/lobe-chat/blob/aa841a3879c30142720485182ad62aa0dbd74edc/src/app/(backend)/oidc/consent/route.ts#L113-L127

PoC

curl Example

curl -i 'http://localhost:3210/oidc/callback/desktop?code=abc&state=test123' \
  -H 'X-Forwarded-Host: google.com' \
  -H 'X-Forwarded-Proto: https'

Impact

  • It can force users to redirect to untrusted external domains, leading to subsequent attacks such as phishing, credential harvesting, and session fixation.
  • 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).
  • The impact can be amplified when redirect chains are combined with other vulnerabilities such as CSP bypass or cache poisoning.

Untrusted input controls a URL used for redirection, which can forward users to attacker-controlled sites. Typical impact: phishing and credential harvesting via a trusted domain.

CVE-2025-59426 has a CVSS score of 4.3 (Medium). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (1.130.1); upgrading removes the vulnerable code path.

Affected versions

@lobehub/chat (< 1.130.1)

Security releases

@lobehub/chat → 1.130.1 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Upgrade @lobehub/chat to 1.130.1 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2025-59426? CVE-2025-59426 is a medium-severity open redirect vulnerability in @lobehub/chat (npm), affecting versions < 1.130.1. It is fixed in 1.130.1. Untrusted input controls a URL used for redirection, which can forward users to attacker-controlled sites.
  2. How severe is CVE-2025-59426? CVE-2025-59426 has a CVSS score of 4.3 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of @lobehub/chat are affected by CVE-2025-59426? @lobehub/chat (npm) versions < 1.130.1 is affected.
  4. Is there a fix for CVE-2025-59426? Yes. CVE-2025-59426 is fixed in 1.130.1. Upgrade to this version or later.
  5. Is CVE-2025-59426 exploitable, and should I be worried? Whether CVE-2025-59426 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2025-59426 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2025-59426? Upgrade @lobehub/chat to 1.130.1 or later.

Other vulnerabilities in @lobehub/chat

CVE-2026-23733CVE-2026-23522CVE-2025-62505CVE-2025-59426CVE-2025-59417

Stop the waste.
Protect your environment with Kodem.