llamaCVEVulnerability Intelligence
/
langroid

CVE-2026-50180

Langroid: SQLChatAgent _validate_query blocklist misses pg_read_file family enabling arbitrary file read

Texto original en inglés · Ver en español

Parche disponiblepath traversal
Descargar PNG JSON
CVSS 4.0
8.7
Alta
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N Fuente: CNA
ExplotaciónSin evidenciaSSVC: ninguna · no figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche a -42 d de la divulgación
Exposición134 dDesde la divulgación, 9 jul 2026, 6:42 p. m.
Detección130 dDesde la divulgación hasta su ingreso al índice
Decisión SSVCSeguir
Remediar en la ventana regular de mantenimiento
Sin explotación conocida, automatizable e impacto técnico parcial. Hay versiones corregidas disponibles.
Ojo con los rangos de versión, son traicioneros.Si el fabricante actualiza el aviso, vuelve a mirar.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Evaluación SSVC +1
Explotación
Remediación
Parche 0.64.0
Monitoreo
Detectada
28 may 26
9 jul 26
10 jul 26
17 nov 26
21 nov 26
28 may 26
12 jul 26
25 ago 26
8 oct 26
21 nov 26
FechaFaseEventoDetalle
Remediación Parche 0.64.0 langroid · -42 d desde divulgación
Divulgación Publicada CVE-2026-50180 divulgada · CVSS 8.7 (CNA)
Divulgación Evaluación SSVC CISA-ADP · explotación ninguna
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Resumen

Langroid is a framework for building large-language-model-powered applications. Prior to version 0.64.0, `SQLChatAgent` in `langroid` ships a `_validate_query` defense-in-depth layer whose `_DANGEROUS_SQL_PATTERNS` regex blocklist enumerates dangerous SQL primitives by specific function name. The list misses the canonical PostgreSQL filesystem-disclosure family `pg_read_file()`, `pg_stat_file()`, `pg_ls_logdir()`, `pg_ls_waldir()`, `pg_current_logfile()` (and similar `SELECT`-shaped functions in the same family). It also leaves SQL Server `OPENDATASOURCE` and SQLite `ATTACH '<file>' AS x` (DATABASE keyword omitted) unblocked. An attacker able to shape the LLM's generated SQL (directly via prompt input or transitively via prompt-injection in data the LLM ingests) can read arbitrary files from the PostgreSQL host through ordinary `SELECT` queries, even with the agent's strict default configuration (`allow_dangerous_operations=False`, `allowed_statement_types=['SELECT']`). The payloads survive the statement-type allowlist (each is a `SELECT`) and pass through the regex blocklist (none of the function names match), then reach the live SQLAlchemy engine via `SQLChatAgent.run_query`. Version 0.64.0 contains a patch for the issue.

Vector CVSS 4.0

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · CNA
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
Requisitos de ataqueAT:N
NingunoPresentes
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:N
NingunaPasivaActiva
Confid. (sistema)VC:H
AltoBajoNinguno
Integridad (sistema)VI:N
AltoBajoNinguno
Disponib. (sistema)VA:N
AltoBajoNinguno
Confid. (posterior)SC:N
AltoBajoNinguno
Integridad (posterior)SI:N
AltoBajoNinguno
Disponib. (posterior)SA:N
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
10.0/ 10Muy alto
Vector 10.0 (muy fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
langroid< 0.64.0
0.64.0
0.69.22
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
pypilangroid
Corregida 0.64.0 -42 d 0.69.22 no afectada
Versiones corregidas0.64.0
Explotación

Arsenal público

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

Referencias
Fabricantehttps://github.com/langroid/langroid/security/advisories/GHSA-pmch-g965-grmr
Otrahttps://github.com/langroid/langroid/commit/00b7dd7b79c5d03c94be284cf3459d98195ebfba

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