GHSA-526j-mv3p-f4vv
eKuiper API endpoints handling SQL queries with user-controlled table names.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
Blast Radius
github.com/lf-edge/ekuiper/v2🐹github.com/lf-edge/ekuiperReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
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
- Deploy eKuiper instance (default config is sufficient).
- Send a crafted request to the SQL query endpoint:
curl -X POST http://localhost:9081/sql-query \
-H "Content-Type: application/json" \
-d '{
"table": "sensors; DROP TABLE users; --",
"operation": "getLast"
}'
- Effect: Executes two SQL queries — the first selects data, the second drops the
userstable. - Verify Result:
sqlite3 etc/kuiper/data/kuiper.db ".tables"
Impact
CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Refferences
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/lf-edge/ekuiper/v2 | all versions | 2.2.1 |
| 🐹Go | github.com/lf-edge/ekuiper | all versions | No fix |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/lf-edge/ekuiper/v2. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update github.com/lf-edge/ekuiper/v2 to 2.2.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-526j-mv3p-f4vv is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-526j-mv3p-f4vv is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-526j-mv3p-f4vv. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-526j-mv3p-f4vv in your dependencies?
O3 detects GHSA-526j-mv3p-f4vv across Go dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.