FlawAtlas
Search the atlas
CVE-2025-54379 High

eKuiper API endpoints handling SQL queries with user-controlled table names.

### 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

Exploit probability 0.8%
Published July 24, 2025
Required by Not available
Last source change July 13, 2026

02 / AFFECTED SOFTWARE

Affected packages

Go github.com/lf-edge/ekuiper
Go github.com/lf-edge/ekuiper/v2
Go github.com/lf-edge/ekuiper
Go github.com/lf-edge/ekuiper/v2
PyPI ekuiper

139 explicit affected versions

Unknown Unknown

1 explicit affected versions

03 / CONNECTIONS

Connected vulnerabilities

04 / EVIDENCE

Source records

Open Source Vulnerabilities GHSA-526j-mv3p-f4vv

### 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

View original source
Open Source Vulnerabilities GO-2025-3827

eKuiper API endpoints handling SQL queries with user-controlled table names. in github.com/lf-edge/ekuiper

View original source
Open Source Vulnerabilities PYSEC-2025-241

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.

View original source
Open Source Vulnerabilities CVE-2025-54379

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.

View original source

05 / REFERENCES

Further evidence