Baja

Lobe Chat vulnerable to Server-Side Request Forgery with native web fetch module

  • Publicada: 17.10.2025
  • Actualizado: 11.10.2026 10:22

Vulnerability Description


Vulnerability Overview

  • When the client sends an arbitrary URL array and impl: ["naive"] to the tRPC endpoint tools.search.crawlPages, the server issues outbound HTTP requests directly to those URLs. There is no defensive logic that restricts or validates requests to internal networks (127.0.0.1, localhost, private ranges) or metadata endpoints (169.254.169.254).

  • Flow: client input (urls, impls) → service invocation in the tRPC router → the service passes the URLs to Crawler.crawl → the Crawler prioritizes the user-specified impls (naive) → the naive implementation performs a server-side fetch(url) as-is (SSRF) → the server collects responses from internal resources.

  • In the dev environment, authentication can be bypassed using the lobe-auth-dev-backend-api: 1 header (production requires a valid token). In the PoC, this was used to successfully retrieve the internal API at localhost:8889 from the server side.

Vulnerable Code

https://github.com/lobehub/lobe-chat/blob/d942a635b36a231156c60d824afa573af8032572/packages/web-crawler/src/crawImpl/naive.ts#L39-L45

PoC


PoC Description

  • In dev mode, we made a single tRPC call using the auth-bypass header lobe-auth-dev-backend-api: 1. Since tRPC requires the body to be in the form {"json": { ... }}, we placed urls and impls: ["naive"] inside json to induce the server to request the internal URL (http://localhost:8889/internel-api).

  • The response follows tRPC’s wrapping structure, so the actual body of the internal API is included as a string (JSON string) at result.data.json.results[0].data.content. We post-process it with jq for readability.

curl Example

bash
curl -sS -X POST 'http://localhost:3010/trpc/tools/search.crawlPages' \
  -H 'Content-Type: application/json' \
  -H 'lobe-auth-dev-backend-api: 1' \
  --data '{"json":{"urls":["http://localhost:8889/internal-api"],"impls":["naive"]}}' | jq -r '.result.data.json.results[0].data.content' | jq .
<img width="1916" height="851" alt="poc" src="https://github.com/user-attachments/assets/f3ad34da-f8ac-4e29-9360-3cf1d1f706d8" />

Impact


  • Since the server performs outbound requests to internal networks, localhost, and metadata endpoints, an attacker can abuse the server’s network position to access internal resources (internal APIs, management ports, cloud metadata, etc.).

  • As a result, this can lead to exposure of internal system information, leakage of authentication tokens/secret keys (e.g., IMDSv1/v2), misuse of internal admin interfaces, and provide a foothold for further lateral movement.

  • By leveraging user-supplied impls to force the unfiltered naive implementation, SSRF defenses—such as blocking private/metadata IPs, DNS re-validation/re-resolution, and redirect restrictions—can be bypassed.

Software afectado

Haz clic en una tecnología para ver todas sus vulnerabilidades.

PlataformaPaqueteVersiones vulnerablesCorregida en
Paquete de npm @lobehub/chat < 1.136.2 1.136.2

Referencias

Puntuación CVSS 3/10
Vector CVSS
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:L/I:N/A:N
Debilidad (CWE)
CWE-918
Plataforma
npm
Paquete
@lobehub/chat
Publicada
17.10.2025
Actualizado
11.10.2026 10:22

Fuentes y licencias

OSV / GitHub Advisory Database - GHSA-fgx4-p8xf-qhp9 - 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.

Todas (11) en el archivo
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

  1. 2024: 5
  2. 2025: 3
  3. 2026: 3
Gravedad:
  1. Lobe Chat vulnerable to Server-Side Request Forgery with native web fetch module esta entrada
    Baja · 3.0 CVE-2025-62505 < 1.136.2 1.136.2
  2. Alta · 8.1 CVE-2024-32965 < 1.19.13 1.19.13
  3. Crítica · 9.0 CVE-2024-32964 < 0.150.6 0.150.6

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.

Conectar tu aplicación
Newsletter DockRay

La seguridad de tus aplicaciones en tu correo

Vulnerabilidades importantes, recomendaciones concretas y consejos prácticos para tus aplicaciones. Elige tus tecnologías y sigue lo que importa para tu proyecto.

  • Un resumen diario de nuevas vulnerabilidades, también las críticas.
  • Avisos sobre actualizaciones importantes.
  • Consejos prácticos sobre seguridad y monitorización de aplicaciones.

Déjalo vacío para recibir avisos de todas las tecnologías.

Suscripción gratuita. Date de baja con un clic en cualquier correo.