BIT-postgresql-2026-116325: PostgreSQL reindexdb index name quoting allows SQL injection
SQL injection in PostgreSQL reindexdb allows an object creator to execute arbitrary SQL as the database user running reindexdb, via a crafted index name embedded in the parallel catalog query for --jobs with --index. Within major versions 17-18, minor versions before PostgreSQL 18.7 and 17.12 are affected. Versions before PostgreSQL 17 are unaffected.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
bitnami/postgresqlto a version that resolves this vulnerability.Fixed in 17.12.0 - Upgrade
Upgrade
bitnami/postgresqlto a version that resolves this vulnerability.Fixed in 18.7.0 - Upgrade
Upgrade
PostgreSQLto a version that resolves this vulnerability.Fixed in 18.7 - Upgrade
Upgrade
PostgreSQLto a version that resolves this vulnerability.Fixed in 17.12
Event History
Frequently Asked Questions
Which deployments are affected?
PostgreSQL 17.x before 17.12 and PostgreSQL 18.x before 18.7 are affected. PostgreSQL versions before 17 are unaffected.
What conditions are required for exploitation?
An attacker must be able to create an object with a crafted index name. A database user must then run reindexdb with both --jobs and --index, and the injected SQL executes as that user.
Does this affect ordinary reindexdb usage?
The issue is specifically in the parallel catalog query used when reindexdb is invoked with --jobs together with --index. The provided information does not indicate impact when those options are not used together.
What can be done before updating?
Avoid running reindexdb with --jobs and --index together, particularly against databases where less-trusted users can create objects. Limit object-creation privileges and avoid running reindexdb as a highly privileged database user where possible.