NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🐹
🐹 Go
Not in CISA KEV
HIGH severity

CVE-2026-104129 — prest

HIGHFix: prest/prest@084348f

CVE-2026-104129 is a high-severity (CVSS 8.1) SQL Injection vulnerability in github.com/prest/prest. A fix is available for github.com/prest/prest — see the affected versions and patch details below.

pREST _groupby function-expression SQL injection (incomplete fix of CVE-2025-58450)

Also known asGHSA-v9v2-98xq-627c
Published
Updated
Affected
2 pkgs
Patched
1 / 2
Exploits
None indexed
Exploitation data as of Nov 20, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
0.3%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs28th percentile — riskier than 28% of all scored CVEsHighest risk

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

2 pkgs affected
🐹github.com/prest/prest🐹github.com/prest/prest/v2

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

Description

What the fix did and the gap

The v2.3.0 fix (commit e88dabb) routed the _select field through a strict new gate, sanitizeSelectField (postgres.go:947/1003/2097). The sibling groupby path was left on the far weaker isSafeSQLExpression. adapters/postgres/postgres.go, GroupByClause (line 1946): a groupby field that contains balanced parens takes the raw-SQL-expression branch (around lines 1999-2006), gated only by isSafeSQLExpression (line 2001, defined at 2043). That gate validates only the OUTERMOST function name against a 13-entry allowlist and uses a character allowlist that permits spaces, single quotes and parens. It blocks ;, --, /* , unbalanced parens and an outer pg prefix, but NOT a trailing UNION SELECT ..., a nested (SELECT ...) subquery, or an inner pg function. sanitizeSelectField (the CVE fix) rejects exactly those.

Input and attacker

GET /{database}/{schema}/{table}?_select=id&_groupby=upper((SELECT+1))+UNION+SELECT+current_user. Sink trace: controllers/crud.go:131 calls GroupByClause unconditionally, concatenates it into sqlSelect (crud.go:133), executed at crud.go:176 with only the WHERE values parameterized. Reached after only a table read-permission check, passable unauthenticated in the default config (the same pipeline and attacker model as the anchor).

Verification level

EXECUTED with negative controls (agent-run go test ./adapters/postgres/, PASS): isSafeSQLExpression wrongly accepts four payloads and GroupByClause emits them raw (e.g. GROUP BY upper((SELECT 1)) UNION SELECT current_user, and GROUP BY abs((SELECT 1 FROM pg_sleep(3)))); negative controls with ; and -- are rejected; and sanitizeSelectField (the CVE fix) rejects the exact UNION payload the sibling gate accepts. I independently re-confirmed at HEAD that _groupby is gated by isSafeSQLExpression (postgres.go:2001) while _select uses sanitizeSelectField (postgres.go:947). NOT verified: end-to-end UNION exfiltration against a live Postgres (needs column/type alignment, Postgres-gated). The pg_sleep DoS primitive is unconditional and needs no alignment; char-by-char blind extraction is constrained (commas are pre-split, and =/</> are blocked).

Suggested fix

Route _groupby through the same strict gate as select (sanitizeSelectField-style: reject nested subqueries, UNION, inner pg functions, and anything past a single allowlisted function call), or parameterize/whitelist the group-by columns.

Also checked and SOUND

The other builders (WhereByRequest, OrderByRequest, JoinByRequest, CountByRequest, the jsonb/tsquery paths, ->>having, ident.IsValid) are sound; only the _groupby non-having function branch is the weak sibling.

Advisory-source note

Five-source enumeration: CVE-2025-58450 (GHSA-p46v-f2x8-qp98, "Systemic SQL Injection", GO-2025-3941) and the newer GHSA-qvx3-q8vx-9q3c (which covers _select, fixed v2.3.0). Neither mentions _groupby / GROUP BY. The systemic advisory's own "nested queries can be performed" note supports the incomplete-fix framing. Not contested.

Dedup

Dedup gate clean: no prest/prest blocking verdict in COVERED-INDEX, DISCLOSURE-INDEX or SCOUT-EXCLUDE.

Tooling

AI assistance wsa used while investigating. The injection is executed-verified with negative controls (isSafeSQLExpression accepts four UNION/subquery/pg_sleep payloads that GroupByClause emits raw, while ;/-- are rejected and the _select gate rejects the same UNION payload), and I confirmed at HEAD that _groupby uses the weak isSafeSQLExpression while _select was hardened with sanitizeSelectField.

Affected Packages

2 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/prest/prestall versionsNo fix
🐹Gogithub.com/prest/prest/v2all versions2.4.0go get github.com/prest/prest/v2@v2.4.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/prest/prest, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    A fix is available for CVE-2026-104129; check the affected-versions list above or the advisory for the patched release of github.com/prest/prest, then make sure no transitive dependency still pins the vulnerable range.

  3. Workarounds

    Until you can upgrade, make sure every query built from user input uses parameterised statements or a prepared-statement API rather than string concatenation, and reduce the database account's privileges so an injected query cannot read or alter data beyond what the feature needs.

Frequently Asked Questions

What the fix did and the gap ---------------------------- The v2.3.0 fix (commit e88dabb) routed the _select field through a strict new gate, sanitizeSelectField (postgres.go:947/1003/2097). The sibling _groupby path was left on the far weaker isSafeSQLExpression. adapters/postgres/postgres.go, GroupByClause (line 1946): a _groupby field that contains balanced parens takes the raw-SQL-expression branch (around lines 1999-2006), gated only by isSafeSQLExpression (line 2001, defined at 2043). That gate validates only the OUTERMOST function name against a 13-entry allowlist and uses a character a
O3 Security · Impact-Aware SCA

Is CVE-2026-104129 in your dependencies?

Find it across Go, including transitive dependencies.

CVE-2026-104129: prest SQL Injection — Fixed in 2.4.0