Read the docs

SQL injection in pREST _groupby function expressions

Priority MEDIUM 40CWE-89Published · Updated

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

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.01503 74th percentileScored 2026-11-30
Fix Fixed prest (prest): 2.4.0github.com/prest/prest/v2 (Go): 2.4.0

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

VendorProductAffected versionsFixed inStatusSource
prestprestbefore 2.4.02.4.0Patch availableCNA
—github.com/prest/prest (Go)up to 1.5.5—No fix listedGHSA-v9v2-98xq-627c
—github.com/prest/prest/v2 (Go)before 2.4.02.4.0Patch availableGHSA-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

  1. 2026-11-19 Threatist record created from CVE-2026-104129
  2. 2026-11-19 CISA SSVC decision points changed
  3. 2026-11-20 Alias added: GHSA-v9v2-98xq-627c
  4. 2026-11-20 Fix available: Go/github.com/prest/prest/[email protected] · GHSA-v9v2-98xq-627c
  5. 2026-11-20 CVSS score added · GHSA-v9v2-98xq-627c
  6. 2026-11-20 Weakness changed · GHSA-v9v2-98xq-627c
  7. 2026-11-20 7 new references · GHSA-v9v2-98xq-627c
  8. 2026-11-25 EPSS moved to the 50th–90th percentile

References

  • TI-2025-36208 pREST has Systemic SQL Injection Vulnerability CVSS 4.0CRITICAL 9.3

Sources