SQL injection in pREST _groupby function expressions
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- SQL injection
- Confidentiality · integrity · availability
- High · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-89.
Summary
pREST before 2.4.0 is affected, including the Go module github.com/prest/prest/v2 before 2.4.0. The _groupby function-expression branch uses a weak check that allows nested subqueries, trailing UNION syntax and inner pg_ functions, so attacker-controlled SQL enters the GROUP BY clause (CWE-89). An unauthenticated remote attacker can exploit this with default settings, or a low-privilege table reader on restricted installations, and a delay-producing function can cause denial of service.
Written with Claude Haiku 5.5 from the sources below · 2026-11-20
Description from the CNA
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| prest | prest | before 2.4.0 | 2.4.0 | Patch available | CNA |
| — | github.com/prest/prest (Go) | up to 1.5.5 | — | No fix listed | GHSA-v9v2-98xq-627c |
| — | github.com/prest/prest/v2 (Go) | before 2.4.0 | 2.4.0 | Patch available | GHSA-v9v2-98xq-627c |
- prest Vendorprest Affected before 2.4.0 Fixed in 2.4.0 Patch available CNA
- github.com/prest/prest (Go) Vendor— Affected up to 1.5.5 Fixed in — No fix listed GHSA-v9v2-98xq-627c
- github.com/prest/prest/v2 (Go) Vendor— Affected before 2.4.0 Fixed in 2.4.0 Patch available GHSA-v9v2-98xq-627c
Remediation
Upgrade pREST to 2.4.0, which fixes the prest/prest product and the github.com/prest/prest/v2 Go module. The sources list no fixed version for github.com/prest/prest.
Written with Claude Haiku 5.5 from the sources below · 2026-11-20
- Fix · CNA prest (prest) Fixed in 2.4.0
- Fix · GHSA-v9v2-98xq-627c github.com/prest/prest/v2 (Go) Fixed in 2.4.0 Advisory →
Timeline
- 2026-11-19 Threatist record created from CVE-2026-104129
- 2026-11-19 CISA SSVC decision points changed
- 2026-11-20 Alias added: GHSA-v9v2-98xq-627c
- 2026-11-20 Fix available: Go/github.com/prest/prest/[email protected] · GHSA-v9v2-98xq-627c
- 2026-11-20 CVSS score added · GHSA-v9v2-98xq-627c
- 2026-11-20 Weakness changed · GHSA-v9v2-98xq-627c
- 2026-11-20 7 new references · GHSA-v9v2-98xq-627c
- 2026-11-25 EPSS moved to the 50th–90th percentile
References
Other 6
- https://github.com/prest/prest/security/advisories/GHSA-v9v2-98xq-627c
- https://github.com/prest/prest/pull/1014
- https://github.com/prest/prest/commit/084348fa82701b098492fc520557ff290b7691e2
- https://github.com/prest/prest/commit/73e4b2aea81e2dbd33942efcb1a313fe3b151a41
- https://github.com/prest/prest/releases/tag/v2.4.0
- https://github.com/prest/prest
More prest vulnerabilities
- TI-2025-36208 pREST has Systemic SQL Injection Vulnerability CVSS 4.0CRITICAL 9.3
Sources
- CVE-2026-104129 · CVE Program
- CVE-2026-104129 · NVD
- FIRST EPSS
- GHSA-v9v2-98xq-627c · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences