blog.rust.gay

PostgreSQL ships 52 security fixes and retires version 14

On November 12, 2026, the PostgreSQL Global Development Group released 18.7, 17.12, 16.16, 15.20, 14.25, and PostgreSQL 19 RC 2. The update fixes 52 security vulnerabilities and more than 140 bugs. It is also the final release of PostgreSQL 14, which is now end-of-life and will receive no further security or bug fixes.

The scale is unusual. A typical minor release fixes a handful of CVEs; this one fixes dozens, including many that can lead to arbitrary code execution. The project's advisory lists 32 CVEs at CVSS 8.8, the highest score in the batch, and a low of 3.1. The practical message is simple: if you run PostgreSQL and you allow users to execute SQL, you should update, and you should treat the client tools as part of the update.

What the release contains

The release covers every supported major branch: 18.7, 17.12, 16.16, 15.20, and 14.25. PostgreSQL 19 RC 2 includes the fixes that apply to 19 and is the second release candidate ahead of general availability, which the project plans for November 19, 2026.

The vulnerabilities are not confined to one subsystem. The advisory lists issues in core server code, procedural languages, text search, logical replication, parallel query, foreign data wrappers, and client utilities. Several are type-confusion bugs, where PostgreSQL handles a value as the wrong type and ends up executing code or reading memory it should not. Others are use-after-free bugs, where a freed object is still reachable, and still others are injection flaws in tools that generate SQL or shell commands.

A few examples show the range:

  • CVE-2026-6460: type confusion after ALTER ... SET DATA TYPE can execute arbitrary code (CVSS 8.8). Schema changes are ordinary administrative work, which makes this a dangerous vector.
  • CVE-2026-116314: pg_restore can execute arbitrary code because it does not properly validate non-plain archives (8.8). Restoring a backup is a routine operation, and the input may come from an untrusted source.
  • CVE-2026-116315: a heap buffer overflow in tsvector_delete() can execute arbitrary code (8.8). Full-text search is a specialized feature, but it is still part of the server's attack surface.
  • CVE-2026-116318: pg_dump allows SQL injection through a not-null constraint name (8.8). The injection is in metadata, not in a query parameter, which is exactly the kind of place input validation is easy to miss.
  • CVE-2026-116330: pg_dump's tar restore.sql fails to block psql command injection (8.8). A backup file becomes a code-execution path when it is restored.
  • CVE-2026-120145: logical replication can write to subscriber system catalogs and execute arbitrary code (8.8). Replication is a trust boundary between systems, and this bug crosses it.
  • CVE-2026-120151: a plpgsql record-field type confusion can execute arbitrary code (8.8). Stored procedures are application logic, so this is not a niche feature.
  • CVE-2026-116325: reindexdb mishandles index-name quoting and allows SQL injection (CVSS 8).
  • CVE-2026-116313: vacuumdb --missing-stats-only lets a database owner execute code as the vacuumdb user (7.2).
  • CVE-2026-120152: pg_show_all_settings() has a use-after-free that discloses memory (4.3).

The lower-scored issues still matter. A memory disclosure can leak credentials or layout information that makes a later exploit easier. A privilege bug can turn a limited database user into a more powerful one. The CVSS score is a prioritization tool, not a reason to skip a fix.

The pattern: type confusion and use-after-free

The dominant pattern in this batch is memory-safety trouble in a large C codebase: type confusion, use-after-free, and buffer overflows. That is not surprising. PostgreSQL is a mature, highly optimized system with decades of C code, extension APIs, and procedural language bridges. The bugs cluster where the server hands data across a boundary: between SQL and a procedural language, between a planner and an executor, between a publisher and a subscriber, or between a client tool and a file.

Type confusion is especially relevant to PostgreSQL because the system is dynamically typed at the SQL level and statically typed in C. A value carries a type OID, and code that trusts the OID without validating the underlying representation can be tricked into treating one structure as another. The fixes in this release are largely about adding or tightening those checks.

Use-after-free bugs follow a similar pattern. PostgreSQL uses memory contexts and caches heavily, and an object that is freed in one code path may still be referenced in another. A parallel query, a portal, or a logical replication worker can hold a pointer across an operation that invalidates it. The fix is usually to extend the lifetime or to re-fetch the object, but finding every path is hard.

The advisory's breadth is a reminder that "memory safety" is not a binary property of a language. PostgreSQL is not Rust, and many of these bugs would be difficult to express in a language with stronger compile-time guarantees. That does not mean a rewrite is the answer; it means operators should expect memory-safety fixes in every release and should not treat a minor-version update as optional.

Client tools are part of the attack surface

One of the most important lessons in this release is that the client tools are not auxiliary. pg_dump, pg_restore, reindexdb, and vacuumdb all have security fixes, and several of them are code-execution issues.

That changes the threat model. A database server is usually protected by network controls, authentication, and least-privilege roles. A backup script often runs with broad filesystem access, on a host that also holds credentials, and it processes files that may have been copied from elsewhere. If pg_restore can be tricked by a malicious archive, the backup host becomes the target. If pg_dump can be tricked by a malicious constraint name, the act of dumping a database becomes dangerous.

The practical steps are straightforward but easy to skip. Update the client binaries along with the server. Keep the tools on the same version as the server where possible. Run backups and restores with the least privilege that works. Treat backup archives as untrusted input, especially if they cross an organizational boundary. And review scripts that interpolate database object names into shell commands, because that is the pattern the injection bugs exploit.

The advisory also notes that the fixes reach PostgreSQL 19 RC 2. Teams testing 19 should update their test environments as well, not just their production branches.

The post-update work people miss

Updating the binaries is necessary but not sufficient. This release requires follow-up work in several cases, and the advisory is explicit about it.

First, reindex suspected GIN indexes. Several fixes address GIN index corruption that could cause queries to miss rows or return unrelated rows. If you suspect an index is affected, REINDEX INDEX your_index_name; is the remedy.

Second, reindex pg_trgm GiST indexes that use the gist_trgm_ops operator class. A bug in pg_trgm GiST indexes could cause searches to miss matching rows. The advisory says you need to reindex after updating.

Third, reindex B-tree indexes on bpchar columns declared without a length. PostgreSQL disabled B-tree deduplication for those columns because it could cause index-only scans to return wrong results. If you have such indexes, reindex them.

Fourth, run REINDEX TABLE on tables that report "missing chunk number" errors. That error can indicate a TOAST table problem, and reindexing the table also reindexes its TOAST table.

Fifth, take a new full backup after updating if you use incremental backups. Several fixes address incremental backups that could produce corrupt backups. The advisory recommends taking a new full backup and basing later incrementals on it.

Sixth, check NOT NULL NO INHERIT constraints on partitioned tables. PostgreSQL now disallows them in all cases, including CREATE TABLE ... LIKE, because they could allow a partition to contain NULL values when it should not. The advisory explains how to find and repair affected constraints.

Seventh, if you run PostgreSQL 19 RC 2, be aware that it reverts support for JSON_ARRAY() and JSON_OBJECT() over arrays, composite types, and range types in expression indexes, generated columns, and partition keys. Objects built that way must be dropped or redefined before upgrading. This detail comes from secondary coverage of the release; teams testing 19 should confirm it against the release notes.

These steps are not optional polish. A patched server with a corrupt index can still return wrong answers, and a patched server with a bad backup can still lose data. The release notes and the "Updating" section of the announcement are the authoritative checklist.

PostgreSQL 14 EOL and the 19 upgrade path

PostgreSQL 14.25 is the last release of the 14 branch. The project's versioning policy gives each major version five years of support, and 14 has reached the end. Running it in production now means running software that will not receive security fixes. The upgrade path is to a supported major version: 15, 16, 17, or 18, with 19 arriving on November 19.

The mechanical part of a minor-version update is simple: stop PostgreSQL, replace the binaries, and restart. Minor releases are cumulative, and you do not need to dump and reload or run pg_upgrade. A major-version upgrade is different: it requires pg_upgrade or a dump/restore, and it needs planning for extensions, replication slots, and application compatibility.

The 19 release candidate adds a specific compatibility wrinkle. RC 2 is mostly identical to the initial 19 release, but the project may still apply fixes before general availability. Teams testing 19 should read the release notes for the JSON function change and check whether their schemas use the affected patterns. If they do, the objects need to be dropped or redefined before the upgrade, not after.

Minor releases are cumulative, which means a site on 16.16 gets the fixes from earlier 16.x releases as well. That is convenient, but it also means the post-update checklist is cumulative: a system that skipped several minor releases may have more than one index to reindex or backup to replace. Operators should read the release notes for the whole branch, not just the latest delta.

Extensions are another variable. The release fixes core code, but an extension that relies on internal APIs may need its own update. PostgreSQL's extension ecosystem is broad, and the project's release notes are the place to check for incompatibilities. Teams running extensions such as PostGIS, pg_stat_statements, or logical-decoding plugins should test the update on a staging copy before rolling it out.

The EOL also has an operational dimension. An unsupported database tends to accumulate risk slowly: a missing patch here, a workaround there, a growing list of CVEs that will never be fixed. The longer an organization waits, the harder the eventual upgrade becomes. The 14 EOL is a good forcing function to plan the move, even if the actual cutover is months away.

What to watch

The volume of fixes in this release is notable, and it is worth watching why.

PostgreSQL has been dealing with a heavy influx of bug reports, some of it assisted by AI and LLM tools. Phoronix reported that PostgreSQL 19 has been running behind schedule because of that burden. If AI-assisted vulnerability discovery continues to scale, releases like this one may become more common: more CVEs, more memory-safety fixes, and more pressure on maintainers to triage and patch.

That has two implications. For operators, the practical response is to build a routine for minor-version updates and post-update maintenance, rather than treating each release as a crisis. For the ecosystem, the response is to invest in memory-safe components where the cost is justified, and to improve tooling for finding and fixing the classes of bugs that dominate this batch.

The other thing to watch is PostgreSQL 19. General availability is planned for November 19, 2026. The RC 2 release is a chance to test the upgrade path, the JSON function change, and the interaction between 19 and the extensions you depend on. A release candidate is not a production target, but it is the right time to find compatibility problems.

For now, the immediate action is clear. Update every supported branch, update the client tools, run the post-update reindex and backup steps, and make a plan for PostgreSQL 14. The release is large, but the response is not complicated: patch, verify, and retire the unsupported version.

Sources


← back to posts