CVE-2026-104129
pREST SQL injection in _groupby parameter
A remote attacker with a low-privilege login can alter database queries to read or change stored data.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
Fuente: CNA
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Remediación | Parche v2.4.0 | github.com/prest/prest/v2 · -115 d desde divulgación | |
| Divulgación | Publicada | CVE-2026-104129 divulgada · CVSS 8.1 (CNA) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Fuente: NIST NVD | Registro visto por primera vez en NIST NVD | |
| Divulgación | Evaluación SSVC | CISA-ADP · explotación ninguna | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Fuente: ENISA EUVD | Registro visto por primera vez en ENISA EUVD | |
| Monitoreo | Fuente: OSV | Registro visto por primera vez en OSV | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
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.
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.
Descripción original del registro (GitHub_M)
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.
Condiciones y alcance
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
gogithub.com/prest/prest |
Sin parche | — | — | v1.5.5 afectada |
gogithub.com/prest/prest/v2 |
Corregida | v2.4.0 | -115 d | v2.5.3 no afectada |
2.4.0v2.4.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/prest/prest/security/advisories/GHSA-v9v2-98xq-627chttps://github.com/prest/prest/pull/1014https://github.com/prest/prest/commit/084348fa82701b098492fc520557ff290b7691e2https://github.com/prest/prest/commit/73e4b2aea81e2dbd33942efcb1a313fe3b151a41https://github.com/prest/prest/releases/tag/v2.4.0Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
