CVE-2025-59426

4.3 MEDIUM

📋 TL;DR

This CVE describes an open redirect vulnerability in Lobe Chat's OIDC implementation. Attackers can manipulate X-Forwarded-* headers to redirect users to malicious domains during authentication flows. This affects Lobe Chat deployments behind reverse proxies that forward untrusted headers without validation.

💻 Affected Systems

Products:
  • Lobe Chat
Versions: All versions prior to 1.130.1
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only vulnerable when deployed behind reverse proxies that forward X-Forwarded-* headers without validation, or when the application trusts these headers without proper validation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Users could be redirected to phishing sites during OIDC authentication, potentially leading to credential theft or session hijacking.

🟠

Likely Case

Attackers could redirect users to malicious sites for phishing or malware distribution during authentication flows.

🟢

If Mitigated

With proper header validation at the reverse proxy level, the vulnerability would be blocked before reaching the application.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires the ability to send HTTP requests with manipulated headers to a vulnerable Lobe Chat instance behind a misconfigured reverse proxy.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.130.1

Vendor Advisory: https://github.com/lobehub/lobe-chat/security/advisories/GHSA-xph5-278p-26qx

Restart Required: No

Instructions:

1. Update Lobe Chat to version 1.130.1 or later. 2. Verify the update by checking the version. 3. No restart required as this is a web application.

🔧 Temporary Workarounds

Configure reverse proxy to strip or validate X-Forwarded-* headers

all

Configure your reverse proxy (nginx, Apache, etc.) to strip or validate X-Forwarded-Host and X-Forwarded-Proto headers before forwarding to Lobe Chat.

# Example nginx configuration to strip headers
proxy_set_header X-Forwarded-Host "";
proxy_set_header X-Forwarded-Proto "";

🧯 If You Can't Patch

  • Configure reverse proxies to strip or validate X-Forwarded-* headers from untrusted sources
  • Implement WAF rules to detect and block open redirect attempts

🔍 How to Verify

Check if Vulnerable:

Check if running Lobe Chat version earlier than 1.130.1 and deployed behind a reverse proxy that forwards X-Forwarded-* headers.

Check Version:

Check the application's version in the UI or via package.json file: cat package.json | grep version

Verify Fix Applied:

Verify the application is running version 1.130.1 or later and test that manipulated X-Forwarded-* headers no longer cause redirects to external domains.

📡 Detection & Monitoring

Log Indicators:

  • Unusual redirects during OIDC flows
  • Requests with manipulated X-Forwarded-* headers

Network Indicators:

  • Redirects to unexpected external domains during authentication

SIEM Query:

web_requests WHERE (http_user_agent CONTAINS 'LobeChat' OR url_path CONTAINS '/oidc/') AND (http_referer CONTAINS 'malicious-domain' OR redirect_url CONTAINS 'external-domain')

🔗 References

📤 Share & Export