漏洞描述
pREST 2.3.0 contains a SQL injection vulnerability in the _groupby query parameter of the table select endpoint. GroupByClause in adapters/postgres/postgres.go treats any _groupby field that contains parentheses as a raw SQL expression and only checks it with isSafeSQLExpression. This check validates the outer function name against a small allowlist but accepts nested subqueries, inner function calls and trailing UNION syntax, and the expression is concatenated into the GROUP BY clause. The advisory lists versions up to and including 2.3.0, but the function expression branch was added in 2.3.0 and earlier releases accept only quoted identifiers in _groupby. Authentication is disabled in the default configuration, so default deployments are exposed without credentials. This is an incomplete fix of CVE-2025-58450.
影响产品
修复建议
建议关注厂商安全公告,及时升级至已修复版本,并结合实际资产暴露情况采取缓解措施。