pREST
pREST _groupby function-expression SQL injection (incomplete fix of CVE-2025-58450)
pREST (PostgreSQL REST) is an API that delivers an application on top of a Postgres database. Prior to 2.4.0, the vulnerable parameter is _groupby, handled by GroupByClause in adapters/postgres/postgres.go. adapters/postgres/postgres.go uses the weaker isSafeSQLExpression check for this function-expression branch instead of the stricter single-field validator used for _select. That check validates only the outer function name against a 13-function allowlist and permits nested subqueries, trailing UNION syntax, and inner pg_ functions. controllers/crud.go concatenates the GROUP BY expression while parameterizing only WHERE values, allowing attacker-controlled SQL structure into the clause. Default configuration permits unauthenticated access; a restricted installation may require a low-privilege table reader. UNION-based extraction requires compatible column counts and types and was not verified end to end, but a delay-producing function can cause denial of service without that alignment. This issue is fixed in 2.4.0.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 2.4.0
Fixed in 2.4.0
Mitigation
Upgrade prest to 2.4.0 or later.
References
- Vendor advisory github.com/prest/prest/security/advisories/GHS…
- Patch github.com/prest/prest/pull/1014
- Patch github.com/prest/prest/commit/084348fa82701b09…
2 more
Timeline
Days relative to CVE publicationFirst public PoC 3.4 days after publication; not in CISA KEV. First PoC: googlesky/CVE-2026-104129 (created 23 Nov 2026, found by us: 23 Nov 2026).
PoC repositories
Found on GitHub.1 PoCs
PoCs 1
| Repository | Created | Found by us | Stars | Assessment |
|---|---|---|---|---|
| googlesky/CVE-2026-104129 | 23 Nov 2026 +3.4 d | 23 Nov 2026 | 0 | Scanner |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.