llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · directus

GHSA-4JW7-6MQJ-VRHQ

Server-side request forgery in AI chat file downloads bypasses the outbound IP deny-list

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
Parche1 versiónPrimer parche a -22 d de la divulgación
Exposición93 dDesde la divulgación, 20 ago 2026, 11:30 a. m.
Detección90 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir
Remediar en la ventana regular de mantenimiento
Estimación de Llama con el árbol SSVC de CISA a partir de vector CVSS 3.1 y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico parcial. Hay versiones corregidas disponibles.
Yo la vigilo, tú la programas. ¿Trato?Mis orejas detectan algo raro por aquí.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche 12.2.0
Monitoreo
Detectada +1
29 jul 26
20 ago 26
18 nov 26
21 nov 26
29 jul 26
27 ago 26
25 sept 26
23 oct 26
21 nov 26
FechaFaseEventoDetalle
Remediación Parche 12.2.0 directus · -22 d desde divulgación
Divulgación Publicada GHSA-4JW7-6MQJ-VRHQ divulgada · CVSS 7.7 (GitHub)
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 AI chat endpoint (`POST /ai/chat`) fetches user-supplied URLs server-side without the IP validation Directus applies
to its other outbound requests. A chat message may include a file part, and the URL carried by that part is passed to
the AI SDK, which downloads any file the target model cannot handle natively using a plain `fetch`. That download does
not go through Directus's IP-validated HTTP agent, so the `IMPORT_IP_DENY_LIST` control does not apply to it.

The AI SDK has its own download guard, but it only rejects literal private IP addresses and the `localhost` family and
performs no DNS resolution. A public hostname that resolves to a private address (for example a name pointing at
`127.0.0.1` or `169.254.169.254`) therefore passes the check and is fetched.

Any authenticated user with app access can use this to make the Directus server issue requests to internal-only
destinations. Administrator rights are not required.

Details

Directus passes client-supplied chat messages to the AI SDK's `streamText` after converting them to model messages. For
any file or image part whose URL the configured model does not support natively, the SDK downloads the content itself
using the default download function, which calls global `fetch` directly. Every other server-side fetch in Directus goes
through `agentWithIpValidation` (`api/src/request/agent-with-ip-validation.ts`), which resolves the target host and
rejects denied addresses; the AI SDK download path did not, so the deny-list was not enforced there.

The URL used for that download is attacker-controlled:

  • From 11.16.0 onward, `api/src/ai/chat/lib/transform-file-parts.ts` rewrites each file part's `url` with the value of
  • In 11.14.0 through 11.15.x, before that rewrite existed, the file part's `url` field itself was passed through

The SDK's `validateDownloadUrl` guard blocks literal private IP addresses and the `localhost`, `.local`, and
`.localhost` hostnames. Because it does not resolve DNS, a public hostname whose A record points into private space is
accepted, and the request is then made from the Directus process. The response body is read (subject to the SDK's size
limit) and forwarded to the configured LLM provider as file content, where it can surface in the model's reply to the
caller.

Affected endpoint: `POST /ai/chat`.

Preconditions:

  • `AI_ENABLED` is true (the default). In 11.14.x the AI router was mounted unconditionally.
  • An administrator has configured an LLM provider with an API key, which is the normal state for the feature to be
  • The caller is any authenticated user with app access. The handler only checks `req.accountability.app`, so

Impact

Any user with app access can cause the server to issue HTTP requests to destinations that are not reachable from the
network the user is on, including loopback services, RFC1918 hosts, and cloud instance metadata endpoints. This bypasses
the `IMPORT_IP_DENY_LIST` control that protects the rest of Directus's outbound requests.

Because the fetched response body is read and forwarded to the configured LLM provider as file content, the contents of
internal responses (credentials returned by a metadata service, for example) can be exfiltrated to that provider and
surfaced through the model's reply, making this a read-capable SSRF rather than a blind one.

Workarounds

For deployments that cannot upgrade, set `AI_ENABLED=false`, or leave every LLM provider unconfigured (no API key),
which prevents the request from reaching the download path. Restricting app access does not mitigate this, since
ordinary non-admin app users can trigger it.

Credits

Reported by @colinthebomb1

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
Score de explotaciónQué tan fácil y probable es que la exploten
8.7/ 10Muy alto
Vector 8.7 (muy fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
directus≥ 11.16.0 < 12.2.0
11.16.0
12.2.0
12.6.1
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npmdirectus
Corregida 12.2.0 -22 d 12.6.1 no afectada
Versiones corregidas12.2.0
Explotación

Arsenal público

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

Referencias
Advisoryhttps://github.com/directus/directus/security/advisories/GHSA-4jw7-6mqj-vrhq

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