Open-Source Security Intelligence

Know every vulnerability
before it knows you.

DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.

Search

GHSA-rw2c-8rfq-gwfv

HighCVSS 8.3 / 10
Published Apr 22, 2026·Last modified May 8, 2026
Affected Components(0)

No affected components available

Description

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:

  • Extract data from any table via subquery: (SELECT group_concat(email) FROM user_account) as leak
  • Disclose database internals: sqlite_version(), (SELECT sql FROM sqlite_master)
  • Exfiltrate cross-table data via correlated subqueries

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:

  • Structural expression parsing supporting all documented API forms
  • Schema-based column validation (column names checked against entity schema via TableInfo().GetColumnByName())
  • Exact-match allowlist for aggregate functions (count, sum, avg, min, max, first, last) and scalar functions (date, strftime, upper, lower, etc.)
  • Safe goqu constructors (goqu.I(), goqu.SUM(), goqu.Func()) for all generated expressions
  • allowedTables scope enforcement: qualified column refs (table.col) validated against root entity + explicitly joined tables only

Two 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.

Risk Scores
Base Score
8.3

The vulnerability can be exploited over the network without needing physical access. It is easy for an attacker to exploit this vulnerability. An attacker needs basic access or low-level privileges. No user interaction is needed for the attacker to exploit this vulnerability. The impact is confined to the system where the vulnerability exists. There is a high impact on the confidentiality of the information. There is a high impact on the integrity of the data. There is a low impact on the availability of the system.

Threat Intelligence
7.6

Exploitation activity has been observed. Apply available patches or mitigations urgently.

EPSS
0.34%

The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days.

Exploit
Not available

We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.

Browse More

Scan your project

Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.

Checkout DevGuard