Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate with low-privileged account
-
DeliveryNavigate to Rules Engine
-
ExploitCraft malicious Lua or Go script
-
ExecutionCreate rule targeting IoT topic
-
PersistSend IoT message to trigger rule
-
ImpactExfiltrate files/env vars or pivot via SSRF to internal services
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires an authenticated user account with permission to create rules in the Magistrala Rules Engine - no higher privilege (admin, operator) is needed beyond this basic tenant access. The Rules Engine feature must be deployed and accessible to the attacker's account. Exploitation is fully server-side and automatic: once a malicious rule is created, any subsequent IoT message matching the rule's trigger fires the script without further attacker interaction. The Go engine's only validation - a regex blocking goroutine spawning and panic() - does not limit dangerous standard library calls (os.ReadFile, os.WriteFile, os.Remove, os.Environ, net/http.Get). The Lua engine has no validation at all. No special network position is required beyond authenticated API access to the Rules Engine endpoint. Exploitation is limited by the requirement for a valid account; unauthenticated or network-only attackers cannot reach the vulnerable functionality without credentials. |
| Impact | The NVD-assigned CVSS 3.1 score of 8.8 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H) accurately reflects the network accessibility and low-privilege requirement. Attack complexity is genuinely low - any user who can authenticate and create a rule can trigger exploitation by sending a single IoT message. The S:U (Scope Unchanged) metric in the vendor vector may understate risk: SSRF against internal microservices and arbitrary database access represent impact beyond the vulnerable component, which would warrant S:C. No EPSS data was provided, and this CVE is not currently listed in the CISA KEV catalog, so exploitation probability cannot be quantified numerically. However, the SSVC signals are unfavorable: the technical impact is total (full C/I/A), the attack is automatable (no human interaction, low complexity), and the exploitation mechanism requires no elevated tooling. The primary limiting factor is that exploitation requires an authenticated session - unauthenticated internet attackers cannot reach the rules engine directly. In multi-tenant IoT deployments this is a meaningful escalation path from tenant to platform operator. |
| Exploit ScenarioDerived | An attacker with a low-privileged Magistrala account creates a Lua rule that uses the preloaded ioutil library to read /etc/passwd or application environment files and exfiltrates them via the preloaded HTTP client to an attacker-controlled endpoint. The rule fires automatically when any IoT message matching the rule's trigger conditions arrives, requiring no further interaction. Alternatively, the same HTTP client can be directed at internal microservice endpoints on non-routable RFC 1918 addresses, enabling enumeration and exploitation of internal APIs not exposed to the internet. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 05, 2026
Arbitrary server-side code execution in Magistrala's Rules Engine exposes any authenticated low-privileged user to full file system access, environment variable exfiltration, database manipulation, and SSRF against internal microservices. The platform's two script runtimes - Go via Yaegi and Lua - both fail to sandbox dangerous capabilities: the Go engine exposes the complete standard library behind a trivially insufficient regex filter, while the Lua engine performs no validation whatsoever and explicitly preloads file I/O, HTTP client, and database libraries. No public exploit code has been identified at time of analysis, but the attack requires only a valid account and the ability to create rules, making exploitation straightforward for any tenant or internal user.
RemediationAI
No vendor-released patched version has been identified at time of analysis. The upstream fix has not been confirmed via a tagged release or security advisory - only the GitHub repository root was referenced, with no linked PR, commit, or release. As an immediate compensating control, operators should disable or restrict access to the Rules Engine feature entirely for untrusted or low-privileged users, accepting the trade-off of reduced automation capability. For the Go engine, the Yaegi interpreter should be initialized without stdlib.Symbols and instead with an explicit allowlist of safe packages only - removing this requires code changes. For the Lua engine, dangerous preloaded libraries (db, ioutil, HTTP client, filepath) must be removed from the sandbox initialization in re/lua.go; this also requires a code change. Where disabling the feature is not feasible, restrict rule creation to administrator-level accounts only via RBAC policy, and network-segment the Magistrala host to block outbound HTTP from the process to internal subnets, mitigating the SSRF vector. Monitor the upstream repository at https://github.com/absmach/magistrala for a patch release.
Affected VersionsENISA
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Magistrala (github.com/absmach/magistrala) is an open-source IoT platform whose Rules Engine allows users to author event-driven scripts triggered by incoming IoT messages. Two script runtimes are affected. The Go runtime (re/golang.go) uses the Yaegi interpreter initialized with stdlib.Symbols, which grants scripts access to the entire Go standard library - including os, net/http, and os/exec - and only attempts to block goroutine creation and panic() via a regex check, which provides no meaningful security boundary. The Lua runtime (re/lua.go) performs zero input validation and preloads db (arbitrary DBMS access), ioutil (file I/O), an HTTP client library (enabling SSRF), and filepath (enabling path traversal). The root cause is CWE-94 (Improper Control of Generation of Code): user-supplied scripts reach a powerful interpreter without adequate capability restriction or sandboxing, violating the principle of least privilege at the runtime level.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
S:C assigned because SSRF and arbitrary DB access impact systems beyond the vulnerable Rules Engine component; all other metrics match the vendor vector.
Primary rating from Vendor (309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c).
CVSS VectorVendor: 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c
DescriptionCVE.org
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.
Executive ViewAI
Magistrala Rules Engine contains an arbitrary code execution vulnerability allowing any authenticated user with rule-creation privileges to achieve full file system access, credential exfiltration, database manipulation, and lateral movement against internal microservices. No vendor-released patch identified at time of analysis; no public exploit identified at time of analysis. The minimal attack requirements-valid account and rule-creation permission-create immediate risk to data confidentiality, integrity, and internal network security across all authenticated user populations.
Disable both Yaegi and Lua script runtimes in Magistrala configuration; restrict rule creation to minimal trusted user set with enhanced monitoring; implement network segmentation limiting SSRF attack surface to only necessary internal services; deploy file integrity monitoring on sensitive system files and comprehensive database audit logging; block environment variable access in rule execution contexts where supported; implement alert rules for suspicious rule execution patterns including file operations, HTTP calls, or database transactions.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
EUVD-2026-53308
GHSA-vq5v-m87m-6pqm
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB