llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · 9router

GHSA-QJ3V-64WJ-Q825

Server-Side Request Forgery (SSRF) via /v1/web/fetch Endpoint

Parche disponible
Descargar PNG JSON
CVSS 3.1
7.7
Alta
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche2 versionesPrimer parche a -20 d de la divulgación
Exposición139 dDesde la divulgación, 3 jul 2026, 3:13 a. m.
Detección138 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Parche 0.4.80
Monitoreo
Detectada +1
13 jun 26
3 jul 26
22 jul 26
18 nov 26
19 nov 26
13 jun 26
23 jul 26
1 sept 26
11 oct 26
19 nov 26
FechaFaseEventoDetalle
Remediación Parche 0.4.80 9router · -20 d desde divulgación
Divulgación Publicada GHSA-QJ3V-64WJ-Q825 divulgada · CVSS 7.7 (GitHub)
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Summary

The `/v1/web/fetch` endpoint allows authenticated (or locally-connected) users to make the server fetch arbitrary URLs via external scraping services (Firecrawl, Jina Reader, Tavily, Exa). There is no blocklist or validation preventing requests to internal network resources, cloud metadata endpoints, or other sensitive internal services. The fetched content is returned to the caller, enabling full read-access SSRF.

Description

The web fetch feature (`/v1/web/fetch`) accepts a user-controlled `url` parameter and passes it to external scraping services (Firecrawl, Jina Reader, Tavily, or Exa) to fetch and extract content. While the URL is validated as a valid URL via `new URL(targetUrl)`, there is no restriction on which hosts or IP ranges can be targeted.

Request Flow
  1. `src/app/api/v1/web/fetch/route.js` → `src/sse/handlers/fetch.js` → `open-sse/handlers/fetch/index.js`
  2. The user-provided `url` is passed directly to `handleFetchCore` which dispatches to the configured scraping provider
  3. Each scraping provider (Firecrawl, Jina, Tavily, Exa) makes an HTTP request to the user-specified URL
  4. The response content is returned to the caller
No Internal IP Blocklist

The only URL validation in `src/sse/handlers/fetch.js` (line 75-78):

try {
  new URL(targetUrl);
} catch {
  return errorResponse(HTTP_STATUS.BAD_REQUEST, "Invalid URL format");
}

There is no check for:
- Private IP ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 127.0.0.0/8)
- Cloud metadata endpoints (169.254.169.254, 169.254.170.2)
- Link-local addresses (169.254.0.0/16, fe80::/10)
- Internal DNS names (localhost, *.internal, *.local)
- IPv6 loopback (::1)

Same Issue in Search Endpoint

The `/v1/search` endpoint (`src/sse/handlers/search.js`) has a similar pattern but uses a `query` parameter instead of a URL, which is less directly exploitable for SSRF but still queries external search services.

Evidence

File: `src/sse/handlers/fetch.js` (lines 72-79)

if (!targetUrl || typeof targetUrl !== "string") {
  return errorResponse(HTTP_STATUS.BAD_REQUEST, "Missing required field: url");
}
try {
  new URL(targetUrl);
} catch {
  return errorResponse(HTTP_STATUS.BAD_REQUEST, "Invalid URL format");
}

File: `open-sse/handlers/fetch/index.js` — `handleFetchCore` passes `url` directly to scraping APIs without any host/IP validation.

Steps to Reproduce

  1. Deploy 9Router with a web fetch provider configured (e.g., Jina)
  2. Send a request targeting an internal service:
  3. The server fetches the cloud metadata endpoint and returns the IAM credentials
  4. Alternatively, target internal services:

Impact

  • Cloud credential theft: Access to cloud provider metadata APIs (AWS, GCP, Azure) to steal IAM credentials
  • Internal service access: Bypass firewall rules to reach internal services not exposed to the internet
  • Authentication bypass: The server-side fetch reaches localhost endpoints that may require localhost-only auth
  • Port scanning: Enumerate internal services by observing response timing and errors
  • Scope changed: The attack affects cloud resources and internal infrastructure beyond the 9Router application itself

Recommended Fix

  1. Implement an IP address blocklist that rejects private, link-local, loopback, and cloud metadata IP ranges
  2. Resolve DNS before making the request and validate the resolved IP is not in a blocked range
  3. Consider using an allowlist of permitted domains instead of a blocklist
  4. Log all URLs requested through the fetch endpoint
  5. Rate-limit fetch requests per user/session

### Credits
- Thai Son Dinh from VinSOC Labs (R&D)

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:C
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:N
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
9router< 0.4.72
0.4.72
0.5.119
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npm9router
Corregida 0.4.80 -20 d 0.5.119 no afectada
Versiones corregidas0.4.720.4.80
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/decolua/9router/security/advisories/GHSA-qj3v-64wj-q825

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.