Vulnerabilidad · Publicado 05/08/2026
El motor de reglas de Magistrala permite a usuarios autenticados crear reglas con scripts Go o Lua que se ejecutan en el servidor cuando llegan mensajes IoT. El intérprete Yaegi expone la librería estándar de Go completa (incluidos módulos os y net/http), permitiendo a atacantes autenticados ejecutar código arbitrario con acceso al sistema operativo. Esta vulnerabilidad afecta altas despliegues IoT en manufactura, utility y ciudades inteligentes en LATAM.
Magistrala's Rules Engine allows authenticated users to create rules with embedded Go or Lua scripts executed server-side when IoT messages arrive. The Go script engine (re/golang.go) runs scripts through the Yaegi interpreter with stdlib.Symbols, exposing the full Go standard library (including os and net/http) with validation limited to a regex blocking goroutines and panic() calls; dangerous functions such as os.ReadFile, os.WriteFile, os.Remove, and os.Environ remain fully accessible. The Lua script engine (re/lua.go) performs no input validation at all and preloads dangerous libraries: db (arbitrary database access), ioutil (file I/O), an HTTP client (SSRF), and filepath (traversal). An authenticated low-privileged user can achieve arbitrary file read/write, environment variable leakage, database access, and SSRF against internal microservices.
Score: 8.8/10 — Severidad: HIGH — Estado NIST: Received
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CWE-94
Publicado en NIST NVD.