{"id":"CVE-2025-62505","aliases":["CVE-2025-62505","GHSA-fgx4-p8xf-qhp9"],"related":[],"kind":"vulnerability","state":"published","title":"SSRF in lobehub/lobe-chat with native web fetch module","summary":"LobeChat is an open source chat application platform. The web-crawler package in LobeChat version 1.136.1 allows server-side request forgery (SSRF) in the tools.search.crawlPages tRPC endpoint. A client can supply an arbitrary urls array together with impls containing the value naive. The service passes the user URLs to Crawler.crawl and the naive implementation performs a server-side fetch of each supplied URL without validating or restricting internal network addresses (such as localhost, 127.0.0.1, private IP ranges, or cloud instance metadata endpoints). This allows an attacker with a valid user token (or in development mode using a bypass header) to make the server disclose responses from internal HTTP services, potentially exposing internal API data or cloud metadata credentials. Version 1.136.2 fixes the issue. Update to version 1.136.2. No known workarounds exist.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"LobeChat is an open source chat application platform. The web-crawler package in LobeChat version 1.136.1 allows server-side request forgery (SSRF) in the tools.search.crawlPages tRPC endpoint. A client can supply an arbitrary urls array together with impls containing the value naive. The service passes the user URLs to Crawler.crawl and the naive implementation performs a server-side fetch of each supplied URL without validating or restricting internal network addresses (such as localhost, 127.0.0.1, private IP ranges, or cloud instance metadata endpoints). This allows an attacker with a valid user token (or in development mode using a bypass header) to make the server disclose responses from internal HTTP services, potentially exposing internal API data or cloud metadata credentials. Version 1.136.2 fixes the issue. Update to version 1.136.2. No known workarounds exist.","source":"cvelist"},{"lang":"en","text":"### Vulnerability Description\n---\n\nVulnerability Overview\n \n- 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).\n\n- 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.\n\n- 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.\n\nVulnerable Code\n \n\nhttps://github.com/lobehub/lobe-chat/blob/d942a635b36a231156c60d824afa573af8032572/packages/web-crawler/src/crawImpl/naive.ts#L39-L45\n\n\n### PoC\n---\n\nPoC Description\n\n- 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).\n\n- 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.\n\ncurl Example \n\n```bash\ncurl -sS -X POST 'http://localhost:3010/trpc/tools/search.crawlPages' \\\n  -H 'Content-Type: application/json' \\\n  -H 'lobe-auth-dev-backend-api: 1' \\\n  --data '{\"json\":{\"urls\":[\"http://localhost:8889/internal-api\"],\"impls\":[\"naive\"]}}' | jq -r '.result.data.json.results[0].data.content' | jq .\n```\n<img width=\"1916\" height=\"851\" alt=\"poc\" src=\"https://github.com/user-attachments/assets/f3ad34da-f8ac-4e29-9360-3cf1d1f706d8\" />\n\n\n### Impact\n---\n\n- 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.).\n\n- 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.\n\n- 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"LobeChat es una plataforma de aplicación de chat de código abierto. El paquete web-crawler en LobeChat versión 1.136.1 permite la falsificación de petición del lado del servidor (SSRF) en el endpoint tRPC tools.search.crawlPages. Un cliente puede suministrar un array de URLs arbitrario junto con impls que contengan el valor naive. El servicio pasa las URLs del usuario a Crawler.crawl y la implementación naive realiza una obtención del lado del servidor de cada URL suministrada sin validar o restringir direcciones de red internas (como localhost, 127.0.0.1, rangos de IP privados o endpoints de metadatos de instancias en la nube). Esto permite a un atacante con un token de usuario válido (o en modo de desarrollo usando un encabezado de bypass) hacer que el servidor divulgue respuestas de servicios HTTP internos, exponiendo potencialmente datos internos de la API o credenciales de metadatos en la nube. La versión 1.136.2 corrige el problema. Actualice a la versión 1.136.2. No existen soluciones alternativas conocidas.","source":"nvd"}],"published":"2025-10-17T17:46:09.000Z","modified":"2026-10-08T22:10:00.563Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:L/I:N/A:N","score":3,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:L/I:N/A:N","score":3,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:L/I:N/A:N","score":3,"rating":"LOW"}],"cwes":["CWE-918"],"affected":[{"ranges":[{"version":"< 1.136.2","status":"affected"}],"vendor":"lobehub","product":"lobe-chat","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.136.2"}],"ecosystem":"npm","package":"@lobehub/chat","purl":"pkg:npm/%40lobehub/chat","source":"ghsa"}],"references":[{"url":"https://github.com/lobehub/lobe-chat/security/advisories/GHSA-fgx4-p8xf-qhp9","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/lobehub/lobe-chat/commit/8d59583dca16f218b99213d641733d8ba77f182c","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-62505","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/lobehub/lobe-chat","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/lobehub/lobe-chat/blob/d942a635b36a231156c60d824afa573af8032572/packages/web-crawler/src/crawImpl/naive.ts#L39-L45","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2025-10-17T18:30:45.898Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-62505","url":"https://www.cve.org/CVERecord?id=CVE-2025-62505","licence":"CVE Terms of Use","modified":"2025-10-17T18:32:20.732Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-fgx4-p8xf-qhp9","url":"https://github.com/advisories/GHSA-fgx4-p8xf-qhp9","licence":"CC-BY-4.0","modified":"2025-10-17T21:32:47.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-62505","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-62505","licence":"Public domain","modified":"2026-10-08T22:10:00.563Z"}],"updatedAt":"2026-11-25T22:59:06.539Z","epss":{"score":0.00322,"percentile":0.2721,"date":"2026-12-01T12:00:22.000Z"}}