LF Edge eKuiper CVE-2025-58363
MEDIUMSeverity by source
AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:H
Management API requires high privileges (PR:H); deletion-only impact warrants I:L/A:H with no confidentiality breach possible.
Primary rating from GitHub Advisory.
CVSS VectorGitHub Advisory
Lifecycle Timeline
3DescriptionGitHub Advisory
Summary
A path traversal vulnerability in eKuiper's administrative management endpoints allows privileged users or attackers with access to management APIs to delete arbitrary files or directories on the host system.
Details
In internal/plugin/native/manager.go, the plugin installation endpoint (POST /plugins/*) constructs a temporary directory path by directly joining user-supplied resource names (name) without sufficient sanitization. Supplying path traversal sequences (such as ../../...) causes the deferred cleanup operation (os.RemoveAll) to target arbitrary directories outside the intended plugin directory.
A related issue in configuration and rule lifecycle management where unvalidated rule identifiers could influence file deletion paths was also addressed by introducing unified identifier and file name validation.
PoC
- Target file deletion via plugin installation endpoint:
POST /plugins/sources HTTP/1.1
Host: 127.0.0.1:9081
Content-Type: application/json
{
"name": "../../../../../tmp/target.txt",
"file": "http://example.com/plugin.zip",
"shellParas": [],
"functions": []
}- When the request finishes,
/tmp/target.txtis removed byos.RemoveAll.
Impact
An attacker with access to eKuiper management APIs can cause arbitrary file or directory deletion, potentially leading to denial of service or disruption of the host environment. This vulnerability provides a delete-only capability and does not permit arbitrary file creation, modification, or code execution.
Remediation & Patches
- Upgrade to eKuiper >= 2.4.1: Input validation (
validate.ValidateID) and file path validation (path.VerifyFileName) have been enforced across management endpoints.
Workarounds
- Restrict network access to eKuiper management port (
9081) via authentication, reverse proxies, and firewall rules. - Run eKuiper with a dedicated non-root user account to limit file system deletion permissions.
Credits
- @kosmosec
- @arpitjain099
AnalysisAI
Path traversal in LF Edge eKuiper's plugin installation endpoint (POST /plugins/*) allows high-privileged management API users to delete arbitrary files and directories on the host by embedding traversal sequences such as ../../ in the plugin name parameter. Affected versions are all eKuiper releases prior to 2.4.1 (Go module github.com/lf-edge/ekuiper/v2). A proof-of-concept is published in the GitHub security advisory GHSA-c23q-fw86-9h5x, demonstrating deletion of arbitrary host paths via os.RemoveAll; the advisory explicitly confirms exploitation is bounded to file deletion only - no code execution, file creation, or data exfiltration is achievable.
Technical ContextAI
eKuiper is an open-source, lightweight edge computing streaming SQL engine written in Go, maintained under the LF Edge umbrella and primarily deployed in IoT and industrial edge environments. The vulnerability resides in internal/plugin/native/manager.go, which handles native plugin installation requests (POST /plugins/sources, /plugins/sinks, etc.). The handler concatenates the user-supplied name field directly into a temporary directory path without sanitizing path-separator sequences, permitting traversal outside the intended plugin working directory. A deferred os.RemoveAll() cleanup call - intended to purge temporary install artifacts - then operates on the attacker-controlled resolved path. A related issue was also discovered in rule and configuration lifecycle handlers where unvalidated rule identifiers could similarly influence file deletion paths. CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) precisely describes this root cause. The fix in v2.4.1 introduces validate.ValidateID and path.VerifyFileName across all management endpoints to reject unsafe path components before any filesystem operation.
RemediationAI
Upgrade to eKuiper >= 2.4.1, available at https://github.com/lf-edge/ekuiper/releases/tag/v2.4.1. The release is described as a drop-in upgrade from v2.4.0 with no breaking changes; it enforces validate.ValidateID and path.VerifyFileName across all management endpoints, blocking path traversal sequences before any filesystem operation. For operators unable to upgrade immediately, restrict network access to the management port (default 9081) via firewall rules or a reverse proxy requiring authentication, ensuring only trusted administrative clients can reach the API - this eliminates the attack surface entirely. Additionally, run eKuiper under a dedicated non-root service account with minimal filesystem permissions so that os.RemoveAll is constrained to directories owned by that account; note this mitigation limits blast radius but does not eliminate the traversal, so upgrade remains the authoritative fix.
Same weakness CWE-22 – Path Traversal
View allSame technique Denial Of Service
View allShare
External POC / Exploit Code
Leaving vuln.today
GHSA-c23q-fw86-9h5x