Skip to main content

Magistrala Rules Engine CVE-2026-71235

| EUVDEUVD-2026-53308 HIGH
Code Injection (CWE-94)
2026-08-05 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c GHSA-vq5v-m87m-6pqm
8.8
CVSS 3.1 · Vendor: 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate with low-privileged account
  2. Delivery
    Navigate to Rules Engine
  3. Exploit
    Craft malicious Lua or Go script
  4. Execution
    Create rule targeting IoT topic
  5. Persist
    Send IoT message to trigger rule
  6. Impact
    Exfiltrate 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

magistrala 0

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

Vendor (309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c) PRIMARY 8.8 HIGH
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 9.9 CRITICAL

S:C assigned because SSRF and arbitrary DB access impact systems beyond the vulnerable Rules Engine component; all other metrics match the vendor vector.

3.1 AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:L
Red Hat 8.8 HIGH

Primary rating from Vendor (309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c).

CVSS VectorVendor: 309f9ea4-e3e9-4c6c-b79d-e8eb01244f2c

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.3%
Top 79% exploitable
Prevalence
Low
niche open-source IoT middleware, limited enterprise footprint
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.

Code Injection CRITICAL

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.

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy