github.com/daptin/daptin
Affected
- introduced
0, fixed0.11.4(semver)
Fixed versions
0.11.4
Fix
- Fixed version
0.11.4go get github.com/daptin/[email protected]
Advisory
Also known as: CVE-2026-41422, GO-2026-5640
Daptin: SQL injection via unvalidated goqu.L() calls in aggregate API
Summary
The /aggregate/:typename endpoint accepted column and group query parameters that were passed verbatim to goqu.L() — a raw SQL literal expression builder — without any validation. This bypassed all parameterization and allowed authenticated users with any valid session to inject arbitrary SQL expressions.
Impact
An authenticated low-privilege user could:
(SELECT group_concat(email) FROM user_account) as leaksqlite_version(), (SELECT sql FROM sqlite_master)The vulnerability was confirmed locally; user_account.email values were extracted via a crafted column parameter by a non-admin user.
Root Cause
goqu.L(userInput) in server/resource/resource_aggregate.go inserted user-supplied query parameters directly into the SQL string with no validation.
Fix (v0.11.4)
All goqu.L() calls on user-controlled input were eliminated and replaced with:
TableInfo().GetColumnByName())count, sum, avg, min, max, first, last) and scalar functions (date, strftime, upper, lower, etc.)goqu.I(), goqu.SUM(), goqu.Func()) for all generated expressionsallowedTables scope enforcement: qualified column refs (table.col) validated against root entity + explicitly joined tables onlyTwo additional DoS bugs were fixed in the same commit: uuid.MustParse panic on malformed UUID input and an index-out-of-range panic in ToOrderedExpressionArray on empty sort expressions.
Credits
Reported by @VashuVats.
High Basis: The source's own band: HIGH
0, fixed 0.11.4 (semver)0.11.4
0.11.4go get github.com/daptin/[email protected]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