Vulnerabilities in pkg:golang/github.com/lf-edge/ekuiper

PACKAGE
Advisory Identifier: GHSA-526j-mv3p-f4vv
Advisory Summary

CVE-2025-54379 is a HIGH ekuiper api endpoints handling sql vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Github.com/lf edge/ekuiper/v2 libraries in the Go ecosystem. The issue involves ekuiper api endpoints handling sql queries with user-controlled table names.. Remediation is available by upgrading affected packages to version 2.2.1.

6 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/lf-edge/ekuiper

6 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/lf-edge/ekuiper. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-526j-mv3p-f4vv CVE-2025-54379 HIGH eKuiper API endpoints handling SQL queries with user-controlled table names.
GHSA-gj54-gwj9-x2c6 - HIGH eKuiper /config/uploads API arbitrary file writing may lead to RCE
GHSA-fv2p-qj5p-wqq4 - HIGH LF Edge eKuiper vulnerable to File Path Traversal leading to file replacement
GHSA-9cwv-pxcr-hfjc CVE-2024-52290 MODERATE LF Edge eKuiper Vulnerable to Stored XSS in Configuration Key Functionality
GHSA-6hrw-x7pr-4mp8 CVE-2024-52812 MODERATE LF Edge eKuiper allows Stored XSS in Rules Functionality
GHSA-r5ph-4jxm-6j9p CVE-2024-43406 HIGH LF Edge eKuiper has a SQL Injection in sqlKvStore

CVE-2025-54379 at a Glance

CVE Identifier CVE-2025-54379
GHSA Identifier GHSA-526j-mv3p-f4vv
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product Github.com/lf edge/ekuiper/v2
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2025-54379

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.1
Upgrade github.com/lf-edge/ekuiper/v2 to 2.2.1
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 CVE-2025-54379, 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.1), 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-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. 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 A critical SQL Injection vulnerability exists in the `getLast` API functionality of the eKuiper project. This flaw allows unauthenticated remote attackers to execute arbitrary SQL statements on the underlying SQLite database by manipulating the table name input in an API request. Exploitation can lead to data theft, corruption, or deletion, and full database compromise. ### Details The root cause lies in the use of unsanitized user-controlled input when constructing SQL queries using `fmt.Sprintf`, without validating the `table` parameter. Specifically, in: ```go query := fmt.Sprintf("SELECT * FROM %s ORDER BY rowid DESC LIMIT 1", table) ``` Any value passed as the `table` parameter is directly interpolated into the SQL string, enabling injection attacks. This is reachable via API interfaces that expose time-series queries. ### PoC 1. **Deploy eKuiper instance** (default config is sufficient). 2. **Send a crafted request to the SQL query endpoint**: ```bash curl -X POST http://localhost:9081/sql-query \ -H "Content-Type: application/json" \ -d '{ "table": "sensors; DROP TABLE users; --", "operation": "getLast" }' ``` 3. **Effect**: Executes two SQL queries — the first selects data, the second drops the `users` table. 4. **Verify Result**: ```bash sqlite3 etc/kuiper/data/kuiper.db ".tables" ``` ### Impact CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') ### Refferences - https://github.com/lf-edge/ekuiper/commit/72c4918744934deebf04e324ae66933ec089ebd3

CVE-2025-54379 Affected Github.com/lf edge/ekuiper/v2 Versions

2 component(s)
Fixed Versions:
2.2.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/lf-edge/ekuiper/v2
Go
< 2.2.1
2.2.1
github.com/lf-edge/ekuiper
Go
≤ 1.14.7

References

Frequently Asked Questions

What is CVE-2025-54379?
CVE-2025-54379 is a security vulnerability in Github.com/lf edge/ekuiper/v2 involving eKuiper API endpoints handling SQL queries with user-controlled table names. under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which Github.com/lf edge/ekuiper/v2 versions are affected?
Affected versions include releases prior to 2.2.1 across affected packages: github.com/lf-edge/ekuiper/v2, github.com/lf-edge/ekuiper.
What version fixes CVE-2025-54379?
Upgrading to 2.2.1 (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.1. Upgrade your dependency to 2.2.1 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 CWE is associated with CVE-2025-54379?
CVE-2025-54379 is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.).
How can I check Go dependencies for CVE-2025-54379?
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-526j-mv3p-f4vv",
  "modified" : "2025-07-29T23:38:53Z",
  "published" : "2025-07-24T14:19:17Z",
  "aliases" : [ "CVE-2025-54379" ],
  "summary" : "eKuiper API endpoints handling SQL queries with user-controlled table names. ",
  "details" : "### Summary\nA critical SQL Injection vulnerability exists in the `getLast` API functionality of the eKuiper project. This flaw allows unauthenticated remote attackers to execute arbitrary SQL statements on the underlying SQLite database by manipulating the table name input in an API request. Exploitation can lead to data theft, corruption, or deletion, and full database compromise.\n\n\n### Details\nThe root cause lies in the use of unsanitized user-controlled input when constructing SQL queries using `fmt.Sprintf`, without validating the `table` parameter. Specifically, in:\n\n```go\nquery := fmt.Sprintf(\"SELECT * FROM %s ORDER BY rowid DESC LIMIT 1\", table)\n```\nAny value passed as the `table` parameter is directly interpolated into the SQL string, enabling injection attacks. This is reachable via API interfaces that expose time-series queries.\n\n\n### PoC\n1. **Deploy eKuiper instance** (default config is sufficient).\n2. **Send a crafted request to the SQL query endpoint**:\n```bash\n   curl -X POST http://localhost:9081/sql-query \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n       \"table\": \"sensors; DROP TABLE users; --\",\n       \"operation\": \"getLast\"\n     }'\n```\n3. **Effect**: Executes two SQL queries — the first selects data, the second drops the `users` table.\n4. **Verify Result**:\n```bash\n   sqlite3 etc/kuiper/data/kuiper.db \".tables\"\n```\n\n### Impact\nCWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')\n\n\n### Refferences\n- https://github.com/lf-edge/ekuiper/commit/72c4918744934deebf04e324ae66933ec089ebd3",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/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.1"
      } ]
    } ]
  }, {
    "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-526j-mv3p-f4vv"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-54379"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/lf-edge/ekuiper/commit/72c4918744934deebf04e324ae66933ec089ebd3"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/lf-edge/ekuiper"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-07-24T14:19:17Z",
    "nvd_published_at" : "2025-07-24T23:15:26Z"
  }
}