github.com/lf-edge/ekuiper/v2
Affected
- introduced
0, fixed2.2.1(semver)
Fixed versions
2.2.1
Fix
- Fixed version
2.2.1go get github.com/lf-edge/ekuiper/[email protected]
Advisory
Also known as: CVE-2025-54379, GO-2025-3827, PYSEC-2025-241
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:
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
curl -X POST http://localhost:9081/sql-query \
-H "Content-Type: application/json" \
-d '{
"table": "sensors; DROP TABLE users; --",
"operation": "getLast"
}'
users table. sqlite3 etc/kuiper/data/kuiper.db ".tables"
Impact
CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Refferences
High Basis: The source's own band: HIGH
0, fixed 2.2.1 (semver)2.2.1
2.2.1go get github.com/lf-edge/ekuiper/[email protected]0, last affected 1.14.7 (semver)None listed
No fixed version is listed.
Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0