{"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-fv2p-qj5p-wqq4 in the wild and no public exploit code.","fix":"Upgrade to a fixed version.","what":"GHSA-fv2p-qj5p-wqq4 is a path traversal vulnerability in github.com/lf-edge/ekuiper, published on 3 Jul 2025. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-fv2p-qj5p-wqq4 and fix it if it is affected.\n\nWhat it is: GHSA-fv2p-qj5p-wqq4 is a path traversal vulnerability in github.com/lf-edge/ekuiper, published on 3 Jul 2025. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-fv2p-qj5p-wqq4 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-fv2p-qj5p-wqq4/ (Markdown: https://insights.sbomify.com/GHSA-fv2p-qj5p-wqq4/index.md)","id":"GHSA-fv2p-qj5p-wqq4","markdown":"https://insights.sbomify.com/GHSA-fv2p-qj5p-wqq4/index.md","name":"GHSA-fv2p-qj5p-wqq4","record":{"aliases":["GO-2025-3799"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["code_execution","privilege_escalation"],"network_reachable":"yes","non_default_config":false,"product_category":"Edge computing platform","requires_auth":"low_privilege","summary":"An attacker can exploit path traversal in the file upload handler to overwrite critical binaries, leading to remote code execution and full server compromise.","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\nPath traversal is also known as directory traversal. These vulnerabilities enable an attacker to read arbitrary files on the server that is running an application. In this case, an attacker might be able to write to arbitrary files on the server, allowing them to modify application data or behavior, and ultimately take full control of the server.\n\n### Details\nThe file handler function trusts the filename provided by the user. This includes the cases when the user uses a path instead of the filename. This makes possible to write arbitrary files to the system and **replace** the files owned by _kuiper_ user on the filesystem. The vulnerable function is `fileUploadHandler` which is shown below:\n\nhttps://github.com/lf-edge/ekuiper/blob/1e6b6b6601445eb05316532f5fbef7f0a863ecfe/internal/server/rest.go#L329-L359\n\nExploitation of this vulnerability allows an attacker to rewrite the files owned by ekuiper including the main kuiper binaries as they are owned by _kuiper_ user:\n\n![kuiper binaries](https://github.com/user-attachments/assets/58cf0dc9-20aa-4976-b199-d052a8f5a676)\n\n### PoC\n0.  The files should be uploaded to `/kuiper/data/uploads` directory. So let's move to the `/kuiper/data`, examine the existing files and create an empty `traversal-poc` file owned by  _kuiper_:\n\n![Preparation](https://github.com/user-attachments/assets/c1010cfe-ca3e-481d-b895-820a96f2af60)\n\n1. Now, we can go to _Services \u003e Configuration \u003e File Management_ and try to upload file with name `../test`:\n\n![GUI](https://github.com/user-attachments/assets/31402874-d8a1-450b-91d6-025533c7be33)\n\n![Request in Burp](https://github.com/user-attachments/assets/a4b01f57-5ce0-4791-8a6e-69eb47bca40b)\n\nIn the response we can see the path of the uploaded file and can assume that the traversal worked.\n\n2. Now we can try to change the `traversal-poc` file that we know exists on the server. It can be made with the following request:\n\n![traversal-poc change](https://github.com/user-attachments/assets/164a7088-9152-4a6d-bef4-de8b4637ed51)\n\n3. Now, if we look at the server, we can see the file created in the traversed directory and the replaced poc-file:\n\n![Changed files](https://github.com/user-attachments/assets/1be0bb36-66b7-4552-9b5d-6298c15d59bb)\n\n### Impact\n- Possibility to upload files to external directories;\n- Possibility to rewrite any file owned by _kuiper_ user on the filesystem.\n\nReported by Alexey Kosmachev, Lead Pentester from Bi.Zone","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":"LF Edge eKuiper vulnerable to File Path Traversal leading to file replacement","id":"GHSA-fv2p-qj5p-wqq4","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-3799"},{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":["1.14.7"],"package":"github.com/lf-edge/ekuiper","purl":null,"source":"GHSA-fv2p-qj5p-wqq4"},{"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-fv2p-qj5p-wqq4"},{"ecosystem":"Go","fixed":["2.2.0"],"introduced":["0"],"last_affected":[],"package":"github.com/lf-edge/ekuiper/v2","purl":null,"source":"GHSA-fv2p-qj5p-wqq4"},{"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-fv2p-qj5p-wqq4"},{"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-3799"}],"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":"An attacker can exploit path traversal in the file upload handler to overwrite critical binaries, leading to remote code execution and full server compromise.","url":"https://insights.sbomify.com/GHSA-fv2p-qj5p-wqq4/"}