GrepBoard/Manuals
605 manuals ·

PostgreSQL 18.7 / 17.12 security update — check your version

·Tested on PostgreSQL 18.6 (Docker postgres:18.6) · official announcement of 2026-11-12 · 2026-11·Test scope ↓·8 steps

PostgreSQL 18.7, 17.12, 16.16, 15.20, 14.25 fix 52 security flaws (2026-11-12). How to check your version, update without a dump, and the follow-up steps.

On 2026-11-12 the PostgreSQL project released 18.7, 17.12, 16.16, 15.20 and 14.25, fixing 52 security vulnerabilities and over 140 bugs, per the announcement. This page covers how to tell whether your server has the fix and which post-update steps the announcement names. It does not cover how any of the bugs are exploited.

[1] Ask the server for its minor version. The output below is from an 18.6 server. If your number is lower than the fixed version in the table, you are affected.

console
$ psql -c "SHOW server_version;"        server_version         ------------------------------- 18.6 (Debian 18.6-1.pgdg13+2)(1 row) $ psql -c "SHOW server_version_num;" server_version_num -------------------- 180006(1 row)
MajorFixed inserver_version_num
1818.7180007 or higher
1717.12170012 or higher
1616.16160016 or higher
1515.20150020 or higher
1414.25140025 or higher

[2] If you run 14.24 or older, update to 14.25 first. It carries the security fixes and is also the final PostgreSQL 14 release, with no further security or bug fixes, per the announcement. After that, plan a move to a supported major version separately.

[3] Update to the latest minor of your current major. The announcement says all update releases are cumulative and that you do not need to dump and reload or use pg_upgrade: stop PostgreSQL and update its binaries. Use your distribution's package update, or raise the image tag and recreate the container. If you skipped earlier minors, the announcement warns that their release notes may add steps (18.7 release notes).

[4] If you use extensions, swapping the version is not the whole job. The 18.7 release notes entry for CVE-2026-6460 says: "For full protection, this change requires rebuilding C-language extensions, and there are some extensions that will require source-code changes." Ask the provider of each C extension you run whether it has been rebuilt for 18.7. The notes give no way to check this.

[5] Check the version again after the restart. If clients cannot connect, follow PostgreSQL Connection refused.

console
$ psql -c "SELECT version();"

[6] Do the follow-up steps that apply to you. If you use partitioned tables, check for NOT NULL NO INHERIT constraints with the first query below (verbatim from the announcement). The second query is a catalog query written for this page from the announcement's wording.

SituationWhat the announcement says
You suspect a GIN index is damagedREINDEX INDEX your_index_name;
pg_trgm GiST indexes (gist_trgm_ops)Reindex after updating
You have seen missing chunk number errorsREINDEX TABLE your_table_name; (also rebuilds the TOAST table)
You use incremental backupsTake a new full backup after updating and base later incrementals on it
B-tree index on a bpchar column without a lengthReindex after updating (char(n) columns are not affected)

The output below was produced on an 18.6 container with matching objects created on purpose (the constraint was made through CREATE TABLE … LIKE).

console
$ psql -c "SELECT conrelid::regclass, conname FROM pg_constraint WHERE contype = 'n' AND connoinherit AND conrelid IN (SELECT oid FROM pg_class WHERE relkind = 'p');" conrelid |       conname        ----------+---------------------- part_t   | plain_src_a_not_null(1 row) $ psql -c "SELECT i.indexrelid::regclass AS index_name FROM pg_index i JOIN pg_opclass o ON o.oid = ANY (i.indclass::oid[]) WHERE o.opcname = 'gist_trgm_ops';"   index_name   ---------------- docs_body_trgm(1 row)

Find indexes on bpchar columns declared without a length from the column definitions yourself (not tested).

[7] Handle any constraint the first query returns as the announcement describes. Drop the ones you do not want with ALTER TABLE … DROP CONSTRAINT …; repair the ones you keep with ALTER TABLE … ALTER CONSTRAINT … INHERIT, which fails if any partition has NULLs in that column. Rebuild affected indexes one at a time.

console
$ psql -c "REINDEX INDEX docs_code_btree;"REINDEX

[8] The full CVE list is in the announcement's "Security Issues" section and on the security page. Counting the announcement's CVSS v3.1 scores: of the 52, 32 score 8.8, 38 score 7.0 or higher, and the lowest is 3.1. CVE-2026-6460, listed first, is described as letting a user who can create objects run code as the operating system user running the database.

#postgresql#security#cve#minor-upgrade#reindex