GHSA-fv2p-qj5p-wqq4: Github.com/lf edge/ekuiper/v2 Path Traversal Vulnerability

HIGH
CVSS 8.5
CWE-24
Published
Advisory Summary

GHSA-fv2p-qj5p-wqq4 is a HIGH (CVSS 8.5) path traversal vulnerability (CWE-24: Path Traversal: '../filedir') affecting Github.com/lf edge/ekuiper/v2 libraries in the Go ecosystem. The issue involves lf edge ekuiper vulnerable to file path traversal leading to file replacement. Remediation is available by upgrading affected packages to version 2.2.0.

GHSA-fv2p-qj5p-wqq4 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-fv2p-qj5p-wqq4
Severity HIGH
CVSS v3.1 Base Score 8.5
CWE Classification CWE-24: Path Traversal: '../filedir'
Affected Product Github.com/lf edge/ekuiper/v2
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality None (C:N)
Integrity High (I:H)
Availability Low (A:L)

How to Fix GHSA-fv2p-qj5p-wqq4

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.

github.com/lf-edge/ekuiper/v2 fixed: 2.2.0
Upgrade github.com/lf-edge/ekuiper/v2 to 2.2.0
github.com/lf-edge/ekuiper fixed: Latest secure release
Upgrade github.com/lf-edge/ekuiper to Latest secure release
Verify Direct and Transitive Dependencies

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-fv2p-qj5p-wqq4, 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-24: Path Traversal: '../filedir', where the product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize "../" sequences that can resolve to a location that is outside of that directory. 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

### Summary Path 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. ### Details The 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: https://github.com/lf-edge/ekuiper/blob/1e6b6b6601445eb05316532f5fbef7f0a863ecfe/internal/server/rest.go#L329-L359 Exploitation 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: ![kuiper binaries](https://github.com/user-attachments/assets/58cf0dc9-20aa-4976-b199-d052a8f5a676) ### PoC 0. 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_: ![Preparation](https://github.com/user-attachments/assets/c1010cfe-ca3e-481d-b895-820a96f2af60) 1. Now, we can go to _Services > Configuration > File Management_ and try to upload file with name `../test`: ![GUI](https://github.com/user-attachments/assets/31402874-d8a1-450b-91d6-025533c7be33) ![Request in Burp](https://github.com/user-attachments/assets/a4b01f57-5ce0-4791-8a6e-69eb47bca40b) In the response we can see the path of the uploaded file and can assume that the traversal worked. 2. 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: ![traversal-poc change](https://github.com/user-attachments/assets/164a7088-9152-4a6d-bef4-de8b4637ed51) 3. Now, if we look at the server, we can see the file created in the traversed directory and the replaced poc-file: ![Changed files](https://github.com/user-attachments/assets/1be0bb36-66b7-4552-9b5d-6298c15d59bb) ### Impact - Possibility to upload files to external directories; - Possibility to rewrite any file owned by _kuiper_ user on the filesystem. Reported by Alexey Kosmachev, Lead Pentester from Bi.Zone

GHSA-fv2p-qj5p-wqq4 Affected Github.com/lf edge/ekuiper/v2 Versions

2 component(s)
Fixed Versions:
2.2.0
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-fv2p-qj5p-wqq4?
GHSA-fv2p-qj5p-wqq4 is a security vulnerability in Github.com/lf edge/ekuiper/v2 involving LF Edge eKuiper vulnerable to File Path Traversal leading to file replacement under CWE-24: Path Traversal: '../filedir'.
Which Github.com/lf edge/ekuiper/v2 versions are affected?
Affected versions include releases prior to 2.2.0 across affected packages: github.com/lf-edge/ekuiper/v2, github.com/lf-edge/ekuiper.
What version fixes GHSA-fv2p-qj5p-wqq4?
Upgrading to 2.2.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/lf-edge/ekuiper/v2 affected?
Yes, github.com/lf-edge/ekuiper/v2 is affected in releases prior to 2.2.0. Upgrade your dependency to 2.2.0 or later.
Is github.com/lf-edge/ekuiper affected?
Yes, github.com/lf-edge/ekuiper is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of GHSA-fv2p-qj5p-wqq4?
GHSA-fv2p-qj5p-wqq4 has a CVSS v3.1 base score of 8.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:L.
What CWE is associated with GHSA-fv2p-qj5p-wqq4?
GHSA-fv2p-qj5p-wqq4 is classified under CWE-24: Path Traversal: '../filedir' (The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize "../" sequences that can resolve to a location that is outside of that directory.).
How can I check Go dependencies for GHSA-fv2p-qj5p-wqq4?
Run the dependency tree command: 'inspect dependencies for github.com/lf-edge/ekuiper/v2'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-fv2p-qj5p-wqq4",
  "modified" : "2025-07-03T14:18:04Z",
  "published" : "2025-07-03T14:18:04Z",
  "aliases" : [ ],
  "summary" : "LF Edge eKuiper vulnerable to File Path Traversal leading to file replacement",
  "details" : "### 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\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 > Configuration > 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",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:L"
  } ],
  "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-fv2p-qj5p-wqq4"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/lf-edge/ekuiper"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/lf-edge/ekuiper/blob/1e6b6b6601445eb05316532f5fbef7f0a863ecfe/internal/server/rest.go#L329-L359"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-24" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-07-03T14:18:04Z",
    "nvd_published_at" : null
  }
}