Go
CVE-2026-104129
pREST _groupby function-expression SQL injection (incomplete fix of CVE-2025-58450)
- Severity
- High 8.1
- Published
- 20 Nov 2026
- Last changed
- 20 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 2.4.0
- Exploit chance
- 0.4% in the next 30 daysHigher than 37% of CVEs. EPSS by FIRST, 24 Nov 2026
- Weakness
- SQL injection (CWE-89)
- Attack
- Over the network · Needs a user account · No user action needed
- Attacker can
- Read data · Change data
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N- Also known as
- GHSA-v9v2-98xq-627c
- Sources
- OSV.dev and GitHub
Description
What the fix did and the gap The v2.3.0 fix (commit e88dabb) routed the _select field through a strict new gate, sanitizeSelectField (postgres.go:947/1003/2097). The sibling _groupby path was left on the far weaker isSafeSQLExpression. adapters/postgres/postgres.go, GroupByClause (line 1946): a _groupby field that contains balanced parens takes the raw-SQL-expression branch (around lines 1999-2006), gated only by isSafeSQLExpression (line 2001, defined at 2043). That gate validates only the OUTERMOST function name against a 13-entry allowlist and uses a character allowlist that permits spaces, single quotes and parens. It blocks ;, --, /* , unbalanced parens and an outer pg_ prefix, but NOT a trailing UNION SELECT ..., a nested (SELECT ...) subquery, or an inner pg_ function. sanitizeSelectField (the CVE fix) rejects exactly those.
Affected software
| Software | Affected versions |
|---|---|
github.com/prest/prestGo · osv:Go:github.com/prest/prest |
|
github.com/prest/prest/v2Go · osv:Go:github.com/prest/prest/v2 |
|
About github.com/prest/prest
This is the only vulnerability in github.com/prest/prest in our list.
About github.com/prest/prest/v2
This is the only vulnerability in github.com/prest/prest/v2 in our list.
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-104129
- GitHub Advisory Database https://github.com/advisories/GHSA-v9v2-98xq-627c