CVE-2026-120145: PostgreSQL logical replication can write to subscriber system catalogs, executing arbitrary code
Missing authorization in PostgreSQL logical replication allows a compromised publisher to execute arbitrary code as the operating system user running the superuser-owned subscription, via naming a system catalog as a replication target. Only subscriptions owned by a superuser are vulnerable. Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
Other sources
PostgreSQL logical replication can write to subscriber system catalogs, executing arbitrary code
— Microsoft
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
alpine/postgresql15to a version that resolves this vulnerability.Fixed in 15.20-r0 - Upgrade
Upgrade
alpine/postgresql16to a version that resolves this vulnerability.Fixed in 16.16-r0 - Upgrade
Upgrade
alpine/postgresql17to a version that resolves this vulnerability.Fixed in 17.12-r0 - Upgrade
Upgrade
alpine/postgresql18to a version that resolves this vulnerability.Fixed in 18.7-r0 - Upgrade
Upgrade
debian/postgresql-15to a version that resolves this vulnerability.Fixed in 15.20-0+deb12u1 - Upgrade
Upgrade
debian/postgresql-17to a version that resolves this vulnerability.Fixed in 17.12-0+deb13u1 - Upgrade
Upgrade
debian/postgresql-18to a version that resolves this vulnerability.Fixed in 18.7-1 - Upgrade
Upgrade
azurelinux/postgresqlto a version that resolves this vulnerability.Fixed in 16.16-1 - Upgrade
Upgrade
azurelinux/postgresql17to a version that resolves this vulnerability.Fixed in 0:17.12-6.azl4 - Upgrade
Upgrade
azurelinux/postgresql16to a version that resolves this vulnerability.Fixed in 0:16.16-6.azl4 - 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 deployments are vulnerable?
Only logical replication subscriptions owned by a superuser are vulnerable. A subscription not owned by a superuser is not affected by this issue.
What does an attacker need to exploit this?
The attacker must have compromised the logical replication publisher. Exploitation relies on naming a system catalog as a replication target and can result in arbitrary code execution as the operating-system user running the superuser-owned subscription.
Which PostgreSQL releases contain the fix?
The issue is fixed in PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25. Versions before those releases are affected.