CVE-2025-59426: lobe-chat has an Open Redirect

Published Sep 24, 2025
·
Updated

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

bash 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

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

<img width="1504" height="304" alt="image" src="https://github.com/user-attachments/assets/b71d937d-7be2-49db-8f3d-e07371912800" />

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.

Other sources

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.

— MITRE

Affected Software

2 affected componentsFixes available
npm/@lobehub/chat<1.130.1
1.130.1
lobehub Lobe Chat<1.130.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/@lobehub/chat to a version that resolves this vulnerability.

    Fixed in 1.130.1
  2. Upgrade

    Upgrade Lobe Chat to a version that resolves this vulnerability.

    Fixed in 1.130.1

Event History

Sep 24, 2025
Advisory Published
via GitHub·09:34 PM
Data Sourced
via GitHub·09:34 PM
DescriptionSeverityWeaknessAffected Software
Sep 25, 2025
CVE Published
via MITRE·02:00 PM
Data Sourced
via MITRE·02:00 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-59426?

CVE-2025-59426 has a high severity level due to its potential impact on user data and application integrity.

2

How do I fix CVE-2025-59426?

To fix CVE-2025-59426, upgrade to version 1.130.1 of the @lobehub/chat package.

3

What is the nature of CVE-2025-59426?

CVE-2025-59426 involves improper handling of OIDC redirect URLs which can be exploited to manipulate redirect behavior.

4

Which versions of @lobehub/chat are affected by CVE-2025-59426?

Versions of @lobehub/chat prior to 1.130.1 are affected by CVE-2025-59426.

5

Is CVE-2025-59426 related to reverse proxy configurations?

Yes, CVE-2025-59426 specifically involves vulnerabilities that can arise from improper configurations of reverse proxies handling client-supplied headers.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203