prest: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (CVE-2026-104129)
Published Last modified Sources: CVE.org, EUVD, OSV, Hersteller
What is affected, what to do
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).
Update prest to version 2.4.0, github.com/prest/prest/v2 to version 2.4.0.
Not sure whether and how you are affected? Ask a question about this vulnerability
Metrics
8.1
XIEM Effective CVSS
Highest available CVSS rating from NVD and vendor data.
Source: Vendor (CNA), CVSS v3
8.1
CVSS v3
Severity High on the scale from 0 to 10.
Source: CVE.org, EUVD, OSV, Hersteller
—
EPSS score
No value is available for this vulnerability.
Show all metrics
- Severity
- High
Priority (0–325)
The priority score is a consolidated metric that condenses several individual signals into a single, action-guiding ranking: technical severity (CVSS), exploitation likelihood (EPSS), known-exploited status (KEV) and the context of the affected asset. The aim is to answer the only truly important question in vulnerability management: what first?
Read in glossary- 70.50 Methodology
Exploit maturity
An exploit is code or a technique that specifically uses a concrete vulnerability to force unintended behaviour — such as executing code or escalating privileges. It is the tool that turns a theoretical flaw into a practical attack.
Read in glossary- no public PoC known
XIEM Effective CVSS
XIEM® is the tiered managed-security operating model from NEOSEC and a registered trademark of NEOSEC GmbH. It extends classic SIEM — the central collection, normalisation and correlation of security-relevant events — with endpoint forensics, network visibility and deception technology, and consolidates them into three building tiers: Sentry, Orchestrate and Command.
Read in glossary- 8.1 Methodology
CVSS v3
CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.
Read in glossary- 8.1
KEV status
The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.
Read in glossary- —
- Published
- CISA assessment (SSVC)
- Exploitation: none known · not automatable · Technical impact: total
- Source: CISA Vulnrichment, as of 19 November 2026
CWE
CWE is a catalogue of typical weakness types in software and hardware — such as flawed input validation, unsafe memory handling or poor authentication. Where a CVE names a concrete vulnerability in a concrete product, a CWE describes the underlying class of defect.
Read in glossary- CWE-89
Detection rules
No NEOSEC detection rule is available for this vulnerability yet.
Classification under NIS2 and CRA
Rule-based classification from exploitation status and severity. It does not replace a case-by-case assessment.
NIS2
NIS2 is EU Directive (EU) 2022/2555 to raise the level of cybersecurity across the Union. It substantially broadens obligations compared with the first NIS directive: more sectors, mandatory risk management, staged reporting duties and personal accountability of senior management.
Read in glossary- High technical severity: assess and remediate the vulnerability in vulnerability handling under Art. 21(2)(e) NIS2 and document the decision.
CRA
The CRA is EU Regulation (EU) 2024/2847 setting horizontal cybersecurity requirements for „products with digital elements“ — from industrial controllers and software to connected consumer devices. For the first time manufacturers must ensure security across the entire product lifecycle, handle vulnerabilities and provide security updates.
Read in glossary- From 11.12.2027, Annex I Part II CRA requires manufacturers of affected products with digital elements to handle vulnerabilities without delay and provide security updates.
ISO/IEC 27001
ISO/IEC 27001 is the internationally leading standard for an information security management system (ISMS). It describes a risk-based, process-oriented framework to systematically plan, implement, review and improve information security.
Read in glossary- Control A.8.8, management of technical vulnerabilities: assess relevance to your systems, plan remediation and keep evidence.
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.
Source: cvelistv5, ENISA EUVD, NVD (NIST), CVE.org (MITRE), OSV (Open Source Vulnerabilities), GitHub Security Advisories
Affected products
The following versions are affected. Older releases of the same product line are also vulnerable unless stated otherwise.
| Affected versions | Fixed in | ||
|---|---|---|---|
| prest | prest |
|
|
| go | github.com/prest/prest |
|
|
| go | github.com/prest/prest/v2 |
|
|
Vendors and products
Weakness classes (CWE)
CWE-89Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Base
The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.
Entry at MITRE CWE-89
References & sources
- github.comprest/prest/commit/084348fa82701b098492fc520557ff290b7691e2x_refsource_MISC, euvd, web
- github.comprest/prest/commit/73e4b2aea81e2dbd33942efcb1a313fe3b151a41x_refsource_MISC, euvd, web
- github.comprest/prest/pull/1014x_refsource_MISC, euvd, web
- github.comprest/prest/releases/tag/v2.4.0x_refsource_MISC, euvd, web
- github.comprest/prest/security/advisories/GHSA-v9v2-98xq-627cx_refsource_CONFIRM, euvd, web
- NVD (NIST)vuln/detail/CVE-2026-104129advisory
- github.comprest/prestpackage
Changes to this CVE
Who changed this CVE and when: NVD (analysis, affected products, CVSS), the CVE publisher (CNA) and additional providers such as CISA (ADP).
Record modifiedCISA ADP
CISA assessment (SSVC): exploitation: none known, automatable: no
Show the original change
Individual changes of this event as published by NVD Type Action Before After SSVC assessment added —{"id":"CVE-2026-104129","role":"CISA Coordinator","options":[{"exploitation":"none"},{"automatable":"no"},{"technicalImpact":"total"}],"version":"2.0.3","timestamp":"2026-11-19T19:29:22.412722Z"}Source identifier: 134c704f-9b21-4f2e-91b3-4a467353bcc0
ReceivedGitHub
CVSS V3.1: AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
Weakness type: CWE-89
Description added or changed
Show 9 original changes
Individual changes of this event as published by NVD Type Action Before After Description added —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.CVSS added —AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:NWeakness type (CWE) added —CWE-89Affected versions (publisher) added —New affected value received. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/104xxx/CVE-2026-104129.json">CVE-2026-104129</a>Reference added —https://github.com/prest/prest/commit/084348fa82701b098492fc520557ff290b7691e2Reference added —https://github.com/prest/prest/commit/73e4b2aea81e2dbd33942efcb1a313fe3b151a41Reference added —https://github.com/prest/prest/pull/1014Reference added —https://github.com/prest/prest/releases/tag/v2.4.0Reference added —https://github.com/prest/prest/security/advisories/GHSA-v9v2-98xq-627cSource identifier: security-advisories@github.com
Embed badge
Show the severity and KEV status of this vulnerability on your site – with a link back here. The image is updated hourly.
<a href="https://intel.neosec.eu/en/cve/CVE-2026-104129"><img src="https://intel.neosec.eu/badge/cve/CVE-2026-104129.svg?lang=en" alt="CVE-2026-104129 – NEOSEC Intel" height="20"></a>