GHSA-c23q-fw86-9h5x: Path Traversal
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 1. Target file deletion via plugin installation endpoint: http 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": [] } 2. When the request finishes, /tmp/target.txt is removed by os.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
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
go/github.com/lf-edge/ekuiper/v2to a version that resolves this vulnerability.Fixed in 2.4.1 - Upgrade
Upgrade
eKuiperto a version that resolves this vulnerability.Fixed in 2.4.1 - Configuration
Run eKuiper using a dedicated non-root user account to limit file system deletion permissions.
eKuiper run_as_non_root_user = dedicated non-root user account - Compensating control
Restrict network access to the eKuiper management port 9081 using authentication, reverse proxies, and firewall rules.
Event History
Frequently Asked Questions
Who can exploit this issue?
An attacker needs privileged access to eKuiper's administrative management APIs, including the plugin installation endpoint. The provided proof of concept targets the service on port 9081.
What does successful exploitation allow?
A crafted plugin resource name containing path-traversal sequences can cause deferred cleanup to delete an arbitrary file or directory outside the plugin directory. Unvalidated rule identifiers could also influence file-deletion paths in configuration and rule lifecycle management.
Which remediation is identified in the available information?
The referenced eKuiper v2.4.1 release addresses the issue. The fix introduces unified validation for identifiers and file names to prevent user-controlled values from influencing deletion paths.