PortGate

Advisories · Databases

CVE-2022-1552 High CVSS 8.0

PostgreSQL Autovacuum privilege escalation

Disclosed 2022 · Last reviewed 2 Dec 2026

A user who could create objects in a schema where an extension runs as a privileged user could run code as that user.

What happened

Autovacuum and ANALYZE executed functions under a role the attacker could influence.

Affected and patched versions

Affected
PostgreSQL before 14.3, 13.7, 12.11, 11.16, and 10.21.
Patched
Those minor releases and later.

How to check your server

Check

psql -c "SHOW server_version"

How to fix and harden

  1. Install the minor for your major.
  2. Do not give application roles CREATE on schemas used by privileged extensions.

Fix

psql -c "SHOW server_version"

Sources

Version ranges and fixes follow the vendor advisory. When a distribution backports a fix, trust its security tracker over the upstream version number. New advisories: RSS · JSON