Skip to content
← ENGINEERING NOTES
SOFTWARE7 min read

PostgreSQL's 52-CVE Patch Day: Your Checklist

PostgreSQL 18.7, 17.12, 16.16, 15.20 and 14.25 fix 52 CVEs, led by CVE-2026-6460. Here is how to check exposure, patch safely and rebuild extensions.

BY ASHLIN DARIUS GOVINDASAMY

Fifty-two CVEs in one release is the kind of number that makes a database admin put the kettle on and clear the afternoon. On 12 November 2026 the PostgreSQL project shipped 18.7, 17.12, 16.16, 15.20 and 14.25, and the headline bug, CVE-2026-6460, lets someone who can create objects run arbitrary code as the operating system user that runs the database. This post is the practical PostgreSQL CVE-2026-6460 patch checklist: who is exposed, what to run, and the step people forget (extensions).

What was actually released

The release announcement lists five minor releases plus PostgreSQL 19 RC 2: 18.7, 17.12, 16.16, 15.20 and 14.25. Secondary write-ups count 52 CVEs fixed in total. The project's own advisory for CVE-2026-6460 describes a type confusion after ALTER ... SET DATA TYPE that executes arbitrary code, scored CVSS 3.1 8.8, and says every release before the fixed ones above is affected.

Two more facts matter for planning. First, 14.25 is the final 14.x release, so PostgreSQL 14 is now end of life and gets no more fixes. Second, security write-ups report no known exploitation in the wild and no entry in CISA's known-exploited list as of this writing. That is reassuring, but it is not a patch window; public advisories are exactly what attackers read.

Who is really exposed to CVE-2026-6460

The advisory says the attacker is an object creator: a database role with enough privilege to create tables or types and then alter a column's type. That is not an anonymous internet attacker. It is an app role that was handed CREATE, a developer account, a compromised service credential, or a tenant in a shared database. The lesson is old but worth repeating: in PostgreSQL, 'can create objects' is a lot closer to 'can touch the server' than most people assume.

So the first hands-on step is not patching, it is finding out how many roles are in the blast radius. Run this on each cluster.

sql
-- Server version
SELECT version();

-- Roles that can create databases or roles, or are superusers
SELECT rolname, rolsuper, rolcreatedb, rolcreaterole
FROM pg_roles
WHERE rolsuper OR rolcreatedb OR rolcreaterole
ORDER BY rolname;

-- Roles with CREATE on the current database
SELECT r.rolname
FROM pg_roles r
WHERE has_database_privilege(r.rolname, current_database(), 'CREATE')
  AND r.rolname !~ '^pg_'
ORDER BY 1;

-- Roles with CREATE on each non-system schema
SELECT n.nspname, r.rolname
FROM pg_namespace n
CROSS JOIN pg_roles r
WHERE n.nspname NOT IN ('pg_catalog', 'information_schema')
  AND n.nspname !~ '^pg_toast'
  AND r.rolname !~ '^pg_'
  AND has_schema_privilege(r.rolname, n.oid, 'CREATE')
ORDER BY 1, 2;
Who can create things, and in which databases?

If a long list of application roles can create objects in production, that is worth fixing regardless of any CVE. Apps normally need DML on tables, not DDL. Run migrations from a separate, tightly held role.

sql
-- Stop everyone creating objects in the public schema (default since PG 15, not before)
REVOKE CREATE ON SCHEMA public FROM PUBLIC;

-- App role: data access only
REVOKE CREATE ON SCHEMA public FROM app_rw;
GRANT USAGE ON SCHEMA public TO app_rw;
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO app_rw;

-- Migration role owns the DDL
CREATE ROLE app_migrator LOGIN;
GRANT CREATE ON SCHEMA public TO app_migrator;
Least-privilege hardening you can apply in the same maintenance window

QUICK CHECK

Which role profile is the realistic attacker for CVE-2026-6460?

Patching a minor release safely

Minor releases never need a dump and reload; you swap the binaries and restart. A write-up of this release repeats that, and it matches how PostgreSQL's versioning policy has always worked. Still, read the release notes for your major version before you start, because individual minor releases occasionally ask for a REINDEX or an extension update.

bash
# 1. See what you run and what is available
psql -Atc "show server_version;"
apt-cache policy postgresql-17 | sed -n 1,4p

# 2. Take a safety net first
pg_dumpall --globals-only > /var/backups/globals-$(date +%F).sql
pg_basebackup -D /var/backups/base-$(date +%F) -Ft -z -P

# 3. Upgrade only the PostgreSQL packages
sudo apt-get update
sudo apt-get install --only-upgrade 'postgresql-17' 'postgresql-client-17' 'postgresql-contrib'

# 4. Restart (brief outage) and confirm the new binary is the running one
sudo systemctl restart postgresql@17-main
psql -Atc "show server_version;"
psql -Atc "select pg_postmaster_start_time();"
Debian/Ubuntu with the PGDG repository: patch, restart, verify

On a streaming-replication pair, patch the standby first, restart it, confirm it catches up, switch over, then patch the old primary. That keeps the outage to the length of a failover instead of a restart plus crash recovery.

The step people forget: extensions

Several write-ups of this release say C-language extensions must be rebuilt against the new version for full protection. If you only use extensions installed from distribution packages, the matching package update usually handles that. If you compiled your own, or pin a vendor build, you have homework. Start with an inventory.

sql
-- Installed vs. default version, per database
SELECT name, installed_version, default_version
FROM pg_available_extensions
WHERE installed_version IS NOT NULL
ORDER BY name;

-- Which shared libraries are loaded at server start
SHOW shared_preload_libraries;

-- Update an extension's SQL objects if default_version is newer
-- ALTER EXTENSION pg_stat_statements UPDATE;
Inventory extensions and spot ones needing an update
bash
# Make sure pg_config points at the NEW install
pg_config --version
pg_config --pkglibdir

cd my_extension
make clean
make PG_CONFIG=$(which pg_config)
sudo make install PG_CONFIG=$(which pg_config)
sudo systemctl restart postgresql
Rebuild a self-compiled extension against the patched server
›Why type confusion bugs are so nasty in a database

Type confusion means code treats a chunk of memory as one type when it is really another. In a database, column types decide how stored bytes are read and written. If DDL such as ALTER ... SET DATA TYPE leaves an internal structure believing it holds the old type, later code can read or write memory with the wrong layout, which is the raw material for code execution. I am describing the general bug class, not the exploit details of this CVE; read the advisory itself for what the project says.

After the patch: verify and keep it that way

Verification is cheap. Check every node, including forgotten staging replicas, report-only clones and the developer's Docker container that quietly became production in March.

bash
for h in db1 db2 db3-replica reports-clone; do
  printf '%s: ' "$h"
  psql "host=$h dbname=postgres user=monitor" -Atc "show server_version;" 2>&1
done

# Containers: image tag is not the running version, ask the server
docker ps --format '{{.Names}} {{.Image}}' | grep -i postgres
docker exec my-postgres psql -U postgres -Atc "show server_version;"
Fleet version sweep (edit the host list)

Then make it a habit. Subscribe to the pgsql-announce list or the project's security page, pin minor versions in your images (postgres:17.12, not postgres:17 plus hope), and treat the third Thursday-ish minor release cadence as a standing maintenance slot rather than a surprise.

QUICK CHECK

You ran apt-get install --only-upgrade and psql shows the new version, but pg_postmaster_start_time() is last month. What does that mean?

Takeaway

Patch every supported branch to its fixed minor, restart, rebuild any hand-built extensions, move PostgreSQL 14 off life support, and use the occasion to strip CREATE from roles that never needed it. Fifty-two CVEs sounds scary; a boring, repeatable checklist is how you make it a Tuesday.

SOURCES

  1. PostgreSQL 18.7, 17.12, 16.16, 15.20, 14.25, and 19 RC 2 Released! — PostgreSQL Global Development Group
  2. CVE-2026-6460: PostgreSQL type confusion after ALTER ... SET DATA TYPE executes arbitrary code — PostgreSQL Global Development Group
  3. PostgreSQL 18.7, 17.12, 16.16, 15.20 and 14.25 fix 52 CVEs — Corgea
  4. PostgreSQL CVEs Nov 2026: CVE-2026-6460 RCE Leads 52 Fixes — HeroDevs

Frequently asked questions

Which PostgreSQL versions fix CVE-2026-6460?

18.7, 17.12, 16.16, 15.20 and 14.25, released on 12 November 2026. Earlier minor releases of those branches are affected.

Do I need a dump and restore to apply this update?

No. This is a minor release, so you install the new binaries and restart the server. Read the release notes for your branch in case a REINDEX or extension update is called out.

Who can exploit CVE-2026-6460?

The advisory describes a database user who can create objects. Anonymous clients are not the threat model, but app roles, tenants or compromised credentials with CREATE are.

Is PostgreSQL 14 still supported?

No. 14.25 is the final release of the 14 branch, so it is end of life. Plan a major upgrade to a supported version.

NEWSLETTER

Get the engineering notes in your inbox.

Kernels, GPUs, networks, AI infrastructure — and the things we broke along the way. No spam, one click to leave.

We store only your email address, to send you new articles. See our privacy policy.

TAGS

PostgreSQLCVE-2026-6460SecurityDatabasesPatchingLinux

RELATED

ENGINEERING NOTES

Things we built.Things we broke.Things we learned.