UBUNTU-CVE-2026-116325: 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 to a fixed release to a version that resolves this vulnerability.
Fixed in 18.7 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 17.12
Event History
Frequently Asked Questions
Which PostgreSQL versions are affected?
PostgreSQL 17 minor versions before 17.12 and PostgreSQL 18 minor versions before 18.7 are affected. Versions before PostgreSQL 17 are unaffected.
What conditions are required for exploitation?
An attacker must be able to create a database object with a crafted index name. A database user must then run reindexdb using both --jobs and --index, causing arbitrary SQL to execute as that reindexdb user's database role.
Is the vulnerable behavior used by default?
The issue is specifically triggered by the parallel catalog query used when reindexdb is run with both --jobs and --index. Systems that do not use that option combination do not invoke the described vulnerable path.
What can be done if updating is not immediately possible?
Avoid running reindexdb with --jobs together with --index. Also restrict the ability of untrusted users to create database objects, since exploitation relies on a crafted index name.