CVE-2026-104129: pREST _groupby function-expression SQL injection (incomplete fix of CVE-2025-58450)
Published 2026-11-20 · Updated 2026-11-23 · Also known as GHSA-v9v2-98xq-627c, GO-2026-7020
Summary
The pREST API framework contains an incomplete fix for a SQL injection vulnerability in the _groupby parameter, allowing attackers to execute arbitrary SQL queries. Users of pREST version 1.5.5 and below, or pREST v2 before 2.4.0, should update immediately.
Who is affected
The vulnerability stems from the _groupby parameter being gated by an insufficient validation function that permits nested subqueries and UNION statements, unlike the correctly hardened _select parameter. An attacker with read access to the database can exploit this unauthenticated, provided the default configuration is enabled, to exfiltrate data or trigger a denial-of-service condition via functions like pg_sleep.
Exploitability
With a high CVSS base score of 8.1, the flaw is considered highly exploitable due to the low complexity of the attack and the lack of required privileges. The EPSS score of 0.004 indicates a low current probability of exploitation, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog.
Remediation
- Upgrade github.com/prest/prest/v2 to version 2.4.0 or later.
- For users of the legacy branch, migrate to the v2 codebase as no specific fixed version is provided for 1.5.5 and below.
- Route the _groupby parameter through the sanitizeSelectField gate or implement strict parameterization/whitelisting for group-by operations.
How to check your project
- Check your go.mod file for github.com/prest/prest/v2 versions earlier than 2.4.0.
- Inspect dependency trees to identify if github.com/prest/prest versions 1.5.5 or lower are present.
- Audit application source code for the use of the isSafeSQLExpression function within the GroupByClause logic in adapters/postgres/postgres.go.
Automated analysis of the published advisory data, generated 2026-11-23. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| Go | github.com/prest/prest |
>= 0, <= 1.5.5 | not published | - |
| Go | github.com/prest/prest |
>= 0 (no fix published) | not published | - |
| Go | github.com/prest/prest/v2 |
>= 0, < 2.4.0 | 2.4.0 | go get github.com/prest/prest/[email protected] |
CVSS 3.1 vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
| Attack vector | Network |
|---|---|
| Attack complexity | Low |
| Privileges required | Low |
| User interaction | None |
| Scope | Unchanged |
| Confidentiality | High |
| Integrity | High |
| Availability | None |
FAQ
Is this a new vulnerability or an old one?
This is an incomplete fix for a previous SQL injection vulnerability tracked as CVE-2025-58450, where the _groupby function was not properly secured during the initial remediation.
Does this require authentication to exploit?
In the default configuration, this injection is reachable without authentication, as the vulnerable code is processed after only a basic table read-permission check.
Can this vulnerability lead to remote code execution?
The provided record describes data exfiltration and denial-of-service via pg_sleep; it does not mention or confirm remote code execution.
Original advisory description
References
- WEB https://github.com/prest/prest/security/advisories/GHSA-v9v2-98xq-627c
- ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-104129
- WEB https://github.com/prest/prest/pull/1014
- WEB https://github.com/prest/prest/commit/084348fa82701b098492fc520557ff290b7691e2
- WEB https://github.com/prest/prest/commit/73e4b2aea81e2dbd33942efcb1a313fe3b151a41
- PACKAGE https://github.com/prest/prest
- WEB https://github.com/prest/prest/releases/tag/v2.4.0
Source records: GHSA-v9v2-98xq-627c, GO-2026-7020 (OSV.dev) · EPSS by FIRST, 2026-11-26.