pREST _groupby function-expression SQL injection (incomplete fix of CVE-2025-58450)
CVE-2026-104129Published 19 Nov 2026, 18:49 UTC
Real-world risk
4.8/ 10Medium
Schedule in the normal cycle
PreliminaryFrom the CVSS vector only · confidence low
CVSS
8.1
scored by the vendor (CNA), CVSS 3.1
In plain words
No plain-language summary yet. The original description is below.
Original description (from GitHub_M)
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.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| prestNiche | < 2.4.0 | 2.4.0 |
What to do
Update to a fixed version: 2.4.0.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | Major data exposureReads secrets, credentials, databases, arbitrary files | From the CVSS vector | 0.80 |
| Attacker position | InternetAnyone on the Internet can reach a typical deployment | From the CVSS vector | 1.00 |
| Privileges needed | LowA real low-privileged account | From the CVSS vector | 0.60 |
| Victim interaction | NoneNothing | From the CVSS vector | 1.00 |
| Configuration | DefaultOut-of-the-box installs are vulnerable | From the CVSS vector | 1.00 |
| Reliability | ReliableDeterministic: injection, logic bug, path traversal | From the CVSS vector | 1.00 |
Threat level T4: Weaponized (× 1.00)
A Metasploit module, a Nuclei template, or a verified Exploit-DB entry
- Nuclei scanner template (link)
EPSS 1.4% chance of exploitation in 30 days (percentile 73), as of 2026-12-04.
The arithmetic
- Prerequisites multiplied together0.600
- Threat T4: Weaponized1.000
- 10 × impact 0.8 × prerequisites 0.6 × threat 14.800
- Rounded to one decimal between 0.1 and 104.8
Exploitation and evidence timeline
- 19 Nov 2026 Published
- 3 Dec 2026 Nuclei scanner template first seen
- 3 Dec 2026 Risk 4.8 (cvss fallback)
Weakness
CWE-89
References
- https://github.com/prest/prest/security/advisories/GHSA-v9v2-98xq-627cvendor-advisory
- https://github.com/prest/prest/pull/1014misc
- https://github.com/prest/prest/commit/084348fa82701b098492fc520557ff290b7691e2misc
- https://github.com/prest/prest/commit/73e4b2aea81e2dbd33942efcb1a313fe3b151a41misc
- https://github.com/prest/prest/releases/tag/v2.4.0misc
- CVE-2026-104129 on CVE.org