BIT-postgresql-2026-120147: PostgreSQL dblink reentrant disconnect use-after-free executes arbitrary code
Use after free in the PostgreSQL dblink extension allows an object creator to execute arbitrary code as the operating system user running the database, via type conversion code that re-enters dblink and closes a connection whose results an outer dblink call is reading. Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
bitnami/postgresqlto a version that resolves this vulnerability.Fixed in 14.25.0 - Upgrade
Upgrade
bitnami/postgresqlto a version that resolves this vulnerability.Fixed in 15.20.0 - Upgrade
Upgrade
bitnami/postgresqlto a version that resolves this vulnerability.Fixed in 16.16.0 - 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 - Upgrade
Upgrade
PostgreSQLto a version that resolves this vulnerability.Fixed in 16.16 - Upgrade
Upgrade
PostgreSQLto a version that resolves this vulnerability.Fixed in 15.20 - Upgrade
Upgrade
PostgreSQLto a version that resolves this vulnerability.Fixed in 14.25
Event History
Frequently Asked Questions
Which PostgreSQL versions need to be upgraded?
The issue affects PostgreSQL versions earlier than 18.7, 17.12, 16.16, 15.20, and 14.25. Upgrade to the applicable listed release or a later release in that major-version branch.
What access does an attacker need to exploit this?
The attacker needs privileges to create an object and must be able to cause type conversion code to re-enter dblink and close a connection while an outer dblink call is reading its results. No user interaction is required.
What is the impact of successful exploitation?
Successful exploitation can execute arbitrary code as the operating system user that runs the PostgreSQL database. This can compromise confidentiality, integrity, and availability of the affected database host.