PostgreSQL Fixed 52 CVEs in One Release. The Upgrade Is the Easy Part.
PostgreSQL 18.7, 17.12, 16.16, 15.20 and 14.25 fix 52 security vulnerabilities, almost twice August's record of 28. The binary swap took under a second in my test. The post-update steps are where the work is, and one of them makes some indexes several times bigger.
A PostgreSQL minor update is usually the most boring thing you do all quarter. Stop the server, swap the binaries, start it again. No dump, no pg_upgrade, no migration plan. This quarter the release fixes 52 security vulnerabilities, and the announcement has a whole section on what to do after you upgrade: reindex this, take a new full backup, check these constraints.
On November 12, the PostgreSQL Global Development Group released 18.7, 17.12, 16.16, 15.20 and 14.25. 14.25 is the last PostgreSQL 14 release ever. I pulled the data from the project's security page, ran the upgrade on a test database, and measured the post-update steps.
What the November 2026 PostgreSQL Security Release Fixes
All 52 CVEs are fixed in 18.7. Older branches get fewer because some bugs only exist in newer code:
| Branch | Fixed in | CVEs fixed |
|---|---|---|
| 18 | 18.7 | 52 |
| 17 | 17.12 | 47 |
| 16 | 16.16 | 43 |
| 15 | 15.20 | 41 |
| 14 | 14.25 (final) | 40 |
By severity, using the CVSS 3.1 scores on the security page:
| CVSS | CVEs | What most of them are |
|---|---|---|
| 8.8 | 32 | Mostly memory-safety and type-confusion bugs that can run code as the server |
| 7.0 to 8.1 | 6 | Extension-script SQL injection, reindexdb and vacuumdb bugs, a dblink file append |
| 4.0 to 6.9 | 12 | Memory disclosure, row-security bypasses, wrong rows in triggers |
| Under 4.0 | 2 | A cast-function privilege bypass (3.1) and a pg_basebackup format string (3.7) |
Help Net Security's coverage also counts 32 at 8.8. By component, 43 are in the core server, 6 in client tools, and 3 in contrib modules.
28 of the titles mention executing arbitrary code. That sounds like the end of the world until you read the attack vectors.
Who Can Actually Use These
44 of the 52 need PR:L in the CVSS vector: a role that can log in and run SQL. Of the 38 rated 7.0 or higher, 32 need a login, 3 need high privileges, and 3 need no account at all.
Those last three need you to trust the wrong server:
- CVE-2026-120145 (8.8): a logical replication subscriber can be made to write to its own system catalogs by the publisher it connects to.
- CVE-2026-116330 (8.8): a tar-format
pg_dumpfrom a compromised origin server can run commands inpsqlwhen restored. - CVE-2026-116314 (8.8):
pg_restoredoesn't validate non-plain archives, so a crafted archive runs code.
The only server bug reachable without logging in is CVE-2026-116322, a cancel request that can leak a spinlock, rated 5.3.
So the question for your setup isn't "is port 5432 open to the internet." It's who can log in:
| Your setup | Priority |
|---|---|
| Untrusted or semi-trusted users have SQL access (hosted Postgres, multi-tenant apps, analysts with ad-hoc access) | Patch now. 29 of the 8.8 bugs need only a login to run code as postgres. |
| You restore dumps or subscribe to publications from servers you don't fully control | Patch now, including the client packages. |
| Only your own application connects, with fixed queries | Patch soon. An SQL injection bug in your app becomes a server takeover. |
| You use PL/Perl or PL/Tcl | Patch now. Six of the fixes are in those two languages. |
You run pg_dump, pg_restore, reindexdb or vacuumdb from a separate box |
Upgrade that box too. Six CVEs are in the client tools. |
The client row is easy to miss. If your backups run from a cron job on another server, that machine's postgresql-client package needs the update as much as the database does.
Why 52 Is Not Normal
Every PostgreSQL security fix is listed on one page, with the release that fixed it. Here are the last three years of quarterly releases, counted from each announcement:
| Release date | Newest version | CVEs fixed |
|---|---|---|
| Feb 2024 | 16.2 | 1 |
| May 2024 | 16.3 | 1 |
| Aug 2024 | 16.4 | 1 |
| Nov 2024 | 17.1 | 4 |
| Feb 2025 | 17.3 | 1 |
| May 2025 | 17.5 | 1 |
| Aug 2025 | 17.6 | 3 |
| Nov 2025 | 18.1 | 2 |
| Feb 2026 | 18.2 | 5 |
| May 2026 | 18.4 | 11 |
| Aug 2026 | 18.6 | 28 |
| Nov 2026 | 18.7 | 52 |
That's 7 CVEs in all of 2024, 7 in 2025, and 96 so far in 2026. This one release has more than the seven before it combined, and more than 2024 and 2025 put together.
The release notes credit the reporters for every CVE. Of the 52, 30 credit "the Anthropic OSS program" or "Claude and Ada Logics." Two credit OpenAI's security teams. 17 of those 30 also credit other reporters, and CVE-2026-6460 alone credits more than a dozen. The same count for earlier releases:
| Release | CVEs | Credit Anthropic or Claude | Credit OpenAI |
|---|---|---|---|
| 18.2 (Feb) | 5 | 0 | 0 |
| 18.4 (May) | 11 | 1 | 0 |
| 18.6 (Aug) | 28 | 3 | 3 |
| 18.7 (Nov) | 52 | 30 | 2 |
Anthropic announced free AI security scans for open-source projects on October 8, after an early-access period. InfoQ's write-up quotes PostgreSQL committer Noah Misch, who said of that early access: "Several reports came with fixes we can use nearly as-is." The credits don't say how much of each finding was the model and how much was human triage, so treat the table as who reported the bugs, not as a measure of who found them unaided.
We recommend reading Postgres 19 Is Late Because LLMs Found Forty Years of Bugs to continue reading our selection of content. The same wave of reports is why PostgreSQL 19 slipped to November, and that piece has the commit data behind it.
Postgres 19 Is Late Because LLMs Found Forty Years of Bugs PostgreSQL 19 slipped to November after LLM-assisted review surfaced more bugs than committers could fix. The commit data and what it means. SudoSecurity · Santhdium
The Upgrade Itself
A minor update needs no dump and reload. I built a 600 MB test database on the official postgres:18.6 image, stopped it, and started postgres:18.7 on the same data volume. From docker stop to pg_isready answering took 0.63 seconds, with the image already pulled. A busy server takes longer to shut down cleanly, but the restart itself is close to nothing.
Distro packages arrive on their own schedule. When I checked on November 17, five days after it:
| Source | Status |
|---|---|
Docker Hub postgres:18.7, 17.12, 14.25 |
Published |
| Debian 13 (trixie) | Fixed in 17.12-0+deb13u1, DSA-6625-1 |
| Debian 12 (bookworm) | Fixed in 15.20-0+deb12u1, DLA-4905-1 |
| Ubuntu 24.04 (PostgreSQL 16) | "Needs triage" for CVE-2026-116330, no notice yet |
| Ubuntu 22.04 (PostgreSQL 14) | "Needs triage" for CVE-2026-116330, no notice yet |
If you're on Ubuntu's own packages, the PGDG apt repository at apt.postgresql.org already has the fixed builds. That's where the Docker images get theirs.
The Post-Update Steps, Measured
The announcement lists six things to check after updating. Four of them are about indexes:
- GIN indexes: reindex if you suspect corruption. The GIN fixes cover bugs that could make queries miss rows or return unrelated ones.
pg_trgmGiST indexes usinggist_trgm_ops: reindex.- B-tree indexes on
bpcharcolumns declared with no length: reindex. - "missing chunk number" errors when reading a table:
REINDEX TABLE, which also rebuilds its TOAST index.
The other two are taking a new full backup if you use incremental backups, and checking for NOT NULL NO INHERIT constraints on partitioned tables.
This query finds the indexes and the constraints. The TOAST case only shows up as errors, so there's nothing to search for. It's my own, built on the system catalogs, plus the constraint query from the release notes:
-- Find what the November 2026 PostgreSQL update says to rebuild or repair.
-- Run in each database. Original code using the system catalogs.
-- 1. GIN indexes, pg_trgm GiST indexes, and B-tree indexes on length-less bpchar columns
SELECT i.indexrelid::regclass AS index_name,
i.indrelid::regclass AS table_name,
CASE
WHEN am.amname = 'gin' THEN 'GIN: reindex if you suspect corruption'
WHEN am.amname = 'gist' THEN 'pg_trgm GiST: reindex'
ELSE 'B-tree on bpchar: reindex'
END AS reason,
pg_size_pretty(pg_relation_size(i.indexrelid)) AS size
FROM pg_index i
JOIN pg_class c ON c.oid = i.indexrelid
JOIN pg_am am ON am.oid = c.relam
WHERE c.relnamespace NOT IN ('pg_catalog'::regnamespace, 'information_schema'::regnamespace)
AND (
am.amname = 'gin'
OR (am.amname = 'gist' AND EXISTS (
SELECT 1 FROM unnest(i.indclass) oc
JOIN pg_opclass o ON o.oid = oc
WHERE o.opcname = 'gist_trgm_ops'))
OR (am.amname = 'btree' AND EXISTS (
SELECT 1 FROM pg_attribute a
WHERE a.attrelid = i.indrelid
AND a.attnum = ANY (i.indkey)
AND a.atttypid = 'bpchar'::regtype
AND a.atttypmod = -1))
)
ORDER BY pg_relation_size(i.indexrelid) DESC;
-- 2. NOT NULL NO INHERIT constraints on partitioned tables (query from the release notes)
SELECT conrelid::regclass, conname
FROM pg_constraint
WHERE contype = 'n' AND connoinherit
AND conrelid IN (SELECT oid FROM pg_class WHERE relkind = 'p');
On my test database, one table of 1 million rows, it found:
index_name | table_name | reason | size
-------------------+------------+----------------------------------------+---------
docs_title_trgm | docs | pg_trgm GiST: reindex | 224 MB
docs_body_gin | docs | GIN: reindex if you suspect corruption | 124 MB
docs_status_btree | docs | B-tree on bpchar: reindex | 6816 kB
codes_c | codes | B-tree on bpchar: reindex | 240 kB
REINDEX INDEX CONCURRENTLY on 18.7, on a 2-vCPU cloud VM with 7 GB of RAM:
| Index | Size | Rebuild time |
|---|---|---|
pg_trgm GiST on a text column |
224 MB | 17.6 s |
GIN on a tsvector column |
124 MB | 4.8 s |
B-tree on a bpchar column |
6.8 MB | 0.8 s |
The trigram index is the slow one, about 3.7 times slower than the GIN index at less than twice the size. Scale those up to your own table sizes before you schedule the window. CONCURRENTLY keeps the table writable while it runs.
The constraint bug gives wrong answers
The NOT NULL NO INHERIT fix sounds obscure. Plain CREATE TABLE already refused that constraint on a partitioned table, but CREATE TABLE ... LIKE copied it over without checking. I tried it on 18.6:
CREATE TABLE tmpl (id bigint, created date);
ALTER TABLE tmpl ADD CONSTRAINT tmpl_id_nn NOT NULL id NO INHERIT;
CREATE TABLE events_like (LIKE tmpl) PARTITION BY RANGE (created);
It worked. Then I added a partition, inserted a row with a NULL id, and asked for NULL ids:
| Query on 18.6 | Result |
|---|---|
SELECT * FROM events_like |
1 row, id is NULL |
SELECT count(*) FROM events_like_2026 WHERE id IS NULL |
1 |
SELECT count(*) FROM events_like WHERE id IS NULL |
0 |
The planner trusts the constraint, so it turns id IS NULL on the parent into One-Time Filter: false and never looks at the data. The row is there. The query says it isn't.
After upgrading to 18.7, the same CREATE TABLE ... LIKE fails with "not-null constraints on partitioned tables cannot be NO INHERIT." The broken constraint I'd already made was still there. The release notes' repair, ALTER TABLE ... ALTER CONSTRAINT ... INHERIT, refused with "column "id" of relation "events_like_2026" contains null values." That's the point of the fix: clean up the NULLs first, or drop the constraint.
We recommend reading MySQL, PostgreSQL, Redis, and MongoDB End-of-Life Dates in 2026 to continue reading our selection of content. 14.25 is PostgreSQL 14's final release, and that piece covers the move off it.
MySQL, PostgreSQL, Redis, and MongoDB End-of-Life Dates in 2026 Four major open source databases are hitting end-of-life milestones in 2026, and MySQL 8.0 has already crossed that line. SudoSecurity · Santhdium
The bpchar Fix Makes Some Indexes Up to 4.5 Times Bigger
This is the one I didn't expect. bpchar equality ignores trailing spaces, so 'x' and 'x ' are equal but not byte-identical. B-tree deduplication stores one copy of a repeated key, and on a column with no length limit that could make index-only scans return the wrong value. The commit, "Rescind unsafe deduplication support," fixes it by turning deduplication off for the type. From the patch to varlena.c:
if (opcintype == BPCHAROID)
PG_RETURN_BOOL(false);
char(n) columns are bpchar too, with a length. The release notes say they're "not at risk," which is true for the bug. They still lose deduplication. I built the same three indexes on 1 million rows with four distinct values, fresh on each version:
| Column type | 18.6 index | 18.7 index | Change |
|---|---|---|---|
bpchar (no length) |
6816 kB | 24 MB | 3.6× |
char(8) |
6904 kB | 30 MB | 4.5× |
text |
6816 kB | 6816 kB | none |
Low-cardinality columns like status codes and country codes get the biggest jump, because deduplication saved the most there. A unique column would barely change.
There's a second catch. Deduplication is decided when the index is built and saved in its metapage. The insert path checks that saved flag, from nbtinsert.c on the 18 branch:
/* Perform deduplication pass (when enabled and index-is-allequalimage) */
if (BTGetDeduplicateItems(rel) && itup_key->allequalimage)
So an index built before the update keeps deduplicating after it. I built the indexes on 18.6, upgraded the data directory to 18.7, and inserted another million rows. All three grew by the same amount, roughly doubling to about 13 MB, the same as the text index. On my upgraded test server, bt_metap() from pageinspect showed allequalimage = t on a bpchar index built before the upgrade and f on one rebuilt after it.
The release notes say the patch "disables de-duplication for new index entries." In my test that held only for rebuilt indexes. For a length-less bpchar column, the REINDEX is what applies the fix. For char(n), the change waits until something rebuilds the index, such as a later REINDEX, VACUUM FULL, or pg_repack, and then the index jumps in size.
You can check any B-tree index with SELECT allequalimage FROM bt_metap('index_name') after CREATE EXTENSION pageinspect.
PostgreSQL 14 Is Done
14.25 is the last release. PostgreSQL 14 got 40 of this release's 52 fixes, and 76 security fixes across 2026's four releases. Whatever is found from here on stays unfixed upstream.
Ubuntu 22.04 ships PostgreSQL 14 as its default, so Ubuntu's own package will keep getting whatever fixes Canonical backports. That's a vendor promise, not the PostgreSQL project's. If you run 14 from apt.postgresql.org or Docker, start planning the major upgrade now.
What This Doesn't Cover
I didn't reproduce any of the security bugs, and this article doesn't describe how to trigger them. The CVE details come from the project's security page and release notes. My tests only exercise the post-update steps and two correctness bugs, the partitioned-table constraint and the deduplication change, that the release notes describe in full.
The timings are from one table on a small VM. Your reindex times depend on table size, disk speed, maintenance_work_mem, and how busy the server is. I tested 18.6 to 18.7 only. The older branches got the same deduplication change, but I didn't measure their index sizes. PostgreSQL 19 is due November 19 and isn't covered here.
The Actual Point
The binary swap takes under a second. The work is everything after: patching the client boxes that run your dumps, reindexing GIN, trigram and bpchar indexes, a fresh full backup if you use incremental ones, and a constraint check that can find NULLs your queries have been hiding.
Budget disk space too. If your schema has char(n) status columns, the next rebuild of those indexes will make them several times bigger, and the release notes don't mention it.
CVE counts, scores and vectors are from the PostgreSQL security information page, and the history table is from each release announcement linked there. Quotes and post-update steps are from the November 12, 2026 release announcement and the 18.7 release notes, which are also the source for the reporter credits. The C excerpts are reproduced from the deduplication commit and from nbtinsert.c on REL_18_STABLE. The Noah Misch quote is from InfoQ, and the Help Net Security count is from its release coverage. Package status is from the Debian security tracker and Ubuntu's CVE data for the same CVE, checked November 17, 2026. The SQL is original code using PostgreSQL's system catalogs, run on November 17, 2026 in the official postgres:18.6 and postgres:18.7 Docker images, and every output, size and timing above is reproduced from those runs.
$ tail -f /forums
Discussion
Comments live on the community forums — sign in there to reply.