pREST SQL injection in _groupby parameter
pREST versions before 2.4.0 are affected when a _groupby value contains balanced parentheses, which sends it down the raw-SQL branch. Fixed in 2.4.0.
- Exploited
- No known exploitation
- Fix
- Fixed in 2.4.0
- Who is exposed
- Specific setups only
Summary
The pREST API for PostgreSQL databases is vulnerable to SQL injection through its _groupby parameter, which lets an attacker alter the GROUP BY clause of a database query. An attacker can reach it remotely with a low-privilege login and could read or change data in the underlying database.
Written by a model
Original description
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.
Who should check
Teams running pREST (github.com/prest/prest) 2.3.0 or earlier, including deployments that serve tables without authentication under the default configuration.
“github.com/prest/prest”
What to do
Check whether your setup matches what the bug needs.
The _groupby value contains balanced parentheses, so it takes the raw SQL function-expression branchUpgrade to a fixed version: 2.4.0.
Check your systems with an agent
Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.
Check whether my systems are affected by CVE-2026-104129 (pREST _groupby function-expression SQL injection (incomplete fix of CVE-2025-58450)), using the cve.now data below.
Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.
What cve.now has for CVE-2026-104129 (entry last updated 2026-11-19):
Affected:
- prest prest: fixed in 2.4.0
Fixed versions: 2.4.0.
Conditions (all must be true for the bug to be hit):
- The _groupby value contains balanced parentheses, so it takes the raw SQL function-expression branch (source: https://github.com/prest/prest/security/advisories/GHSA-v9v2-98xq-627c)
Setup: the bug is reachable in a default setup; no special feature or setting is needed.
Attacker needs: network access, low-privilege login, no user action.
CISA KEV: CVE-2026-104129 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-104129 only. If you also check another CVE, look up its own KEV status; never assume it from this one.
How to check:
- Installed software: check what is actually running, not what a repo declares. Read the version from each host, container image and Kubernetes node (the binary's version output, the OS package database, image layers), and check whether the conditions above hold there. Distribution packages may carry a backported fix under an older version number; confirm against the distribution's own advisory.
Verify against the linked advisories before concluding, and cite the date you read each one:
- 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
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.
Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.
Entry: https://cve.now/CVE-2026-104129
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-104129"}.Affected versions
- prest prestfixed in 2.4.0
cve.now Index
- Exploitation0/40No signal
- Exposure8/25Specific setups only, reachable over the network
- Reach?/20Unknown. No tracked technology or package matched
- Severity9.1/10CVSS 8.1, total technical impact per CISA
- No patch0/5No signal
What would change the score
- Would score about 67 if added to CISA KEV
- Would score about 62 if CISA's SSVC rates exploitation active
- Would score about 24 if CISA's SSVC rates it automatable
Timeline
- CVE published
- First seen by cve.now
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: total
- Record last updated
Evidence 7
| Kind | Source |
|---|---|
| Vendor advisory 1Establishes: Affected and fixed versions. | |
| Advisory | GitHub · prest/prest · Advisory GHSA-v9v2-98xq-627c |
| CVE record 2Establishes: The identifier and description. | |
| Record | CVE List · CVE-2026-104129 |
| Record | NVD · CVE-2026-104129 |
| Other links 4 | |
| Repository | GitHub · prest/prest · Pull request #1014 |
| Repository | GitHub · prest/prest · Commit 084348fa |
| Repository | GitHub · prest/prest · Commit 73e4b2ae |
| Repository | GitHub · prest/prest · Release v2.4.0 |
Questions about CVE-2026-104129
Is CVE-2026-104129 being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.
Source: cve.now feed data
What does this mean?
The _groupby query parameter is passed into raw SQL when it contains balanced parentheses, so an attacker can inject SQL and alter the structure of the GROUP BY clause. The advisory classes this as SQL injection (CWE-89) and rates confidentiality and integrity impact as High.
Source: github.com
Which versions are affected by CVE-2026-104129?
prest: before 2.4.0.
Source: cve.now feed data
Am I affected, and how do I check?
The fixed range is pREST before 2.4.0, so check the pREST version in use. Only _groupby values containing balanced parentheses take the raw SQL function-expression branch.
Source: github.com
How do I fix CVE-2026-104129?
Upgrade pREST to 2.4.0, the fixed version named in the product range.
Source: github.com
Why do the sources disagree?
The description says the issue can be reached without authentication, but the CVSS vector lists the privileges-required metric as PR:L, which means low privileges are needed. The sources do not resolve which of these is correct.
Source: github.com
Related
- CVE-2025-58450pREST has Systemic SQL Injection Vulnerability
- CVE-2026-132803A malicious actor with access to the network and low privileges could exploit a series of authenticated SQL Injection vulnerabilities…
- CVE-2026-87977IBM Guardium Data Protection SQL Injection
- CVE-2026-77367Daptin: Unauthenticated SQL Injection via the `sort` query parameter on every entity list endpoint
- CVE-2026-129411Joomla Extension - vi-solutions - Unauthenticated SQL injection in frontend data view filters in Visforms extension 1.0.0-5.6.4, 6.0.0-6.2.1
- CVE-2026-129402Joomla Extension - vi-solutions - Unauthenticated SQL injection in reload task in Visforms extension 1.0.0-5.6.4, 6.0.0-6.2.1
No corrections so far. Something wrong on this page? Report an error.