lobe-chat has an Open Redirect
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,
});
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.
Software afectado
Haz clic en una tecnología para ver todas sus vulnerabilidades.
| Plataforma | Paquete | Versiones vulnerables | Corregida en |
|---|---|---|---|
| Paquete de npm | @lobehub/chat | < 1.130.1 | 1.130.1 |
Referencias
- https://github.com/lobehub/lobe-chat/security/advisories/GHSA-xph5-278p-26qx
- https://nvd.nist.gov/vuln/detail/CVE-2025-59426
- https://github.com/lobehub/lobe-chat/commit/70f52a3c1fadbd41a9db0e699d1e44d9965de445
- https://github.com/lobehub/lobe-chat
- https://github.com/lobehub/lobe-chat/blob/aa841a3879c30142720485182ad62aa0dbd74edc/src/app/(backend)/oidc/consent/route.ts#L113-L127
- Vector CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N- Debilidad (CWE)
CWE-601- Plataforma
- npm
- Paquete
@lobehub/chat- Publicada
- 24.09.2025
- Actualizado
- 11.10.2026 10:22
Fuentes y licencias
OSV / GitHub Advisory Database - GHSA-xph5-278p-26qx - CC BY 4.0
Historial de vulnerabilidades: @lobehub/chat
Todas las vulnerabilidades publicadas de este paquete (Paquete de npm), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.
- Entradas en total
- 11
- Primera → última
- 01.2024 02.2026
- Sin corrección
- 2
- Explotada en ataques
- 0
Distribución por gravedad
- Crítica 2
- Alta 1
- Media 6
- Baja 2
Divulgaciones por año
- 2024: 5
- 2025: 3
- 2026: 3
Identifica las vulnerabilidades de tu aplicación
Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.