BIT-postgresql-2026-116313: PostgreSQL "vacuumdb --missing-stats-only" lets a database owner execute code as the vacuumdb user
Untrusted search path in PostgreSQL vacuumdb allows a database owner to execute arbitrary SQL as the database user running vacuumdb, via shadowing operators used in the --missing-stats-only catalog query. The pgupgrade documentation recommends an affected vacuumdb invocation. Within major version 18, minor versions before PostgreSQL 18.7 are affected. Versions before PostgreSQL 18 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 18.7.0 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 18.7
Event History
Frequently Asked Questions
Which deployments are affected?
Within PostgreSQL major version 18, releases before 18.7 are affected. PostgreSQL versions before 18 are unaffected.
What access does an attacker need?
An attacker needs to be a database owner and must be able to exploit the untrusted search path by shadowing operators used by vacuumdb's --missing-stats-only catalog query. The vulnerable vacuumdb invocation can then execute arbitrary SQL as the database user running vacuumdb.
When is the vulnerable behavior triggered?
The issue is triggered when vacuumdb is run with the --missing-stats-only option. PostgreSQL's pg_upgrade documentation recommends an affected vacuumdb invocation.