Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSend crafted _groupby HTTP request
-
DeliveryPass weak isSafeSQLExpression allowlist gate
-
ExploitInject nested subquery/UNION/pg_sleep into GROUP BY
-
ExecutionExecute raw SQL against Postgres
-
ImpactDeny service via pg_sleep or attempt data read
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The vulnerable surface is the _groupby query parameter on the standard CRUD route (GET /{database}/{schema}/{table}), specifically a value containing balanced parentheses that GroupByClause (adapters/postgres/postgres.go:1946) routes to the raw-SQL-expression branch gated only by isSafeSQLExpression, which validates just the outer function name against a 13-function allowlist and permits nested (SELECT ...) subqueries, trailing UNION SELECT, and inner pg_ functions. In the DEFAULT configuration no authentication is required - only a table read-permission check stands in front, which default config leaves passable unauthenticated; a RESTRICTED installation requires a low-privilege reader of a single table. The pg_sleep denial-of-service primitive works unconditionally with no further prerequisites. What LIMITS exploitation: UNION-based data extraction requires compatible column counts and types and was not verified end to end; blind character-by-character extraction is constrained because commas are pre-split and '=', '<', '>' are blocked; the gate blocks ';', '--', '/*', unbalanced parens, and an outer pg_ prefix, so stacked statements and comment injection are not available via this path. Fixed by upgrading to 2.4.0. |
| Impact | CVSS 8.1 (High) with vector AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N frames this as a network-reachable, low-complexity SQL injection, and the vuln.today priority is 'this_week' rather than act_now/emergency. Signals are mixed and deserve scrutiny. First, a privilege conflict: the vendor vector encodes PR:L (authenticated low-privilege reader), but the description and GHSA advisory both state the flaw is reachable UNAUTHENTICATED in the default configuration - so for default deployments the effective privilege requirement is closer to PR:N, making the real-world exposure worse than the PR:L score implies. Second, an impact conflict: the vector rates C:H/I:H/A:N, yet the only primitive the researcher verified end-to-end is a pg_sleep-based denial of service (an AVAILABILITY impact the vector marks as N), while the C:H UNION-based data extraction was explicitly NOT verified end to end (needs column-count and type alignment) and I:H has no demonstrated write path because the gate blocks ';' (stacked queries). No CISA KEV listing and no EPSS score were provided, so there is no evidence of active or widespread exploitation; exploitation status is best described as a public PoC reference existing (payloads and an in-package Go test in the advisory) but not verified as working weaponized exploit code for data exfiltration. Net: this is a genuine, low-friction SQL injection worth prioritized patching - the reliable, unconditional DoS alone justifies it - but the headline C:H/I:H confidentiality/integrity severity rests on unverified UNION extraction, so it is a real priority tempered by unconfirmed worst-case impact rather than a confirmed mass-exploited emergency. |
| Exploit ScenarioDerived | An attacker sends a single crafted HTTP GET to a pREST endpoint with a malicious _groupby value such as _groupby=abs((SELECT 1 FROM pg_sleep(3))), which passes the weaker isSafeSQLExpression allowlist and is concatenated raw into the GROUP BY clause, forcing the Postgres backend to sleep and consume a connection - a reliable denial of service needing no column alignment. The same injection point can carry a trailing UNION SELECT to attempt reading other tables, though end-to-end exfiltration is unverified and constrained. A public PoC reference exists (advisory payloads plus a passing in-package Go test); it is not verified as a working data-exfiltration exploit. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 19, 2026
SQL injection in pREST's _groupby query parameter lets remote attackers place SQL structure into the GROUP BY clause, providing a reliable denial-of-service primitive through delay functions and potential data exposure when a UNION result can be aligned with the target query. Versions prior to 2.4.0 are affected; default deployments expose the CRUD route without authentication, while restricted deployments require a low-privilege reader of a single table. The issue is an incomplete-fix sibling to CVE-2025-58450, with a public advisory and upstream commits; no CISA KEV entry is present in the supplied data, and the advisory's example payloads are not confirmed as working public exploit code.
RemediationAI
Vendor-released patch: 2.4.0. Upgrade pREST to 2.4.0, which fixes the _groupby function-expression injection; see https://github.com/prest/prest/releases/tag/v2.4.0 and the advisory https://github.com/prest/prest/security/advisories/GHSA-v9v2-98xq-627c. The fix is reflected in PR https://github.com/prest/prest/pull/1014 and commits 084348fa82701b098492fc520557ff290b7691e2 and 73e4b2aea81e2dbd33942efcb1a313fe3b151a41. The advisory describes the complete remediation as routing _groupby through the same strict gate as _select or parameterizing or whitelisting group-by columns outright; until upgrading, restricted deployments that require a low-privilege table reader and do not permit unauthenticated access reduce exposure but do not address the SQL injection once a permitted reader sends the parameter.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 3 packages in go, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
pREST is a Go REST API that builds SQL from query parameters against PostgreSQL. CWE-89 arises because GroupByClause in adapters/postgres/postgres.go:1946 sends _groupby values containing balanced parentheses to a raw expression branch checked by isSafeSQLExpression, which validates only the outer function name against a 13-function allowlist and permits nested (SELECT ...) subqueries, trailing UNION SELECT syntax, and inner pg_ functions. The stricter sanitizeSelectField gate used for _select in v2.3.0 would reject those forms. controllers/crud.go concatenates the GROUP BY output into sqlSelect while parameterizing only WHERE values, so the injected SQL structure reaches execution. In the default configuration the route is reachable unauthenticated; restricted installations require a low-privilege table reader. The advisory author verified in-package Go tests accepting four payloads, including a pg_sleep denial-of-service primitive, but did not verify end-to-end UNION exfiltration because it requires compatible column counts and types; commas are pre-split and =, <, > are blocked, limiting blind extraction, while ;, --, /*, unbalanced parentheses and an outer pg_ prefix are rejected.
Know when Prest gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
Default config is unauthenticated via one HTTP request (PR:N/AV:N/AC:L); C:H for plausible UNION reads, I:N as stacked writes are blocked, A:L for the confirmed pg_sleep DoS.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
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.
Technical POC Analysis
CWE-89 SQL injection in the groupby query parameter of pREST (github.com/prest/prest, Go).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Latest POC
1 public PoC link from nuclei
Sign in to open the public PoC links collected for this CVE.
Executive ViewAI
The pREST API platform contains a high-severity SQL injection flaw in the _groupby parameter that could allow attackers to disrupt service availability or expose sensitive data. Organizations using pREST prior to version 2.4.0, particularly those with unauthenticated default deployments, are at risk and should prioritize remediation.
No vendor-released patch identified at time of analysis; restrict access to the CRUD route to trusted networks, enforce authentication and least privilege, and monitor for suspicious GROUP BY queries.
Threat Model
4 threats: Information Disclosure, Denial of Service, Tampering
5-step attack chain with trust boundaries and controls
Full threat model - attack chain, trust boundaries, controls per stage and evidence - is part of the Pro and Business plans.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
EUVD-2026-130531
GHSA-v9v2-98xq-627c
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB