Technology

PostgreSQL Patches 52 Security Flaws, Including a 22-Year-Old Bug That Lets a Low-Privilege User Run Code

The open-source database's November update fixes dozens of flaws that could let an ordinary database account run code on the server, and it marks the end of the line for PostgreSQL 14.

ONOrbit News NetworkNov 13, 2026 · 5 min read
Rows of server racks with blinking blue status lights in a data center
PostgreSQL's November update fixes 52 flaws, most of which could let a database user run code on the server hosting it.

The PostgreSQL Global Development Group announced an update to all supported versions of PostgreSQL on November 12, releasing versions 18.7, 17.12, 16.16, 15.20 and 14.25, along with the second release candidate of PostgreSQL 19. The update fixes 52 security vulnerabilities and more than 140 other bugs reported over the last several months, making it one of the largest security batches the project has ever shipped at once.

The scale of the batch is what sets it apart. Of the 52 flaws, 32 carry a CVSS score of 8.8, and the release counts 38 high-severity, 12 medium-severity and 2 low-severity issues. Most of the flaws let a database user, or a user who can create objects, run code as the operating system account behind PostgreSQL. On shared or hosted databases, that can break the boundary between tenants and the server itself. As of November 13, no exploitation of the flaws in the wild had been reported.

The headline flaw is CVE-2026-6460, a type confusion after ALTER ... SET DATA TYPE that executes arbitrary code, rated 8.8. Security researcher Mehmet Ince, who reported the flaw, traced the underlying bug to 2004, making it about 22 years old and present in every PostgreSQL shipped since the ALTER TABLE ... ALTER COLUMN ... TYPE feature landed. In his published account of the flaw, Ince showed that four SQL statements, run as a login role with no privileges at all, could crash a vulnerable server, and that the same confusion could be turned into native code execution.

The mechanism is a gap between what a prepared statement captured and what the type system says when it runs. A user creates a custom row type with a UUID field, prepares a query against it, then changes that field to bytea, a binary data type, before running the prepared statement. The server keeps the old bytes but reads them as the new type, and the crafted value is treated as a memory pointer. An independent reproduction built the vulnerable 17.11 release from source, ran the four statements as a zero-privilege role and watched the server die with a segmentation fault, then ran the same statements on the fixed 17.12 and got a clean error instead.

The fix is structural rather than a patch on one code path. PostgreSQL now stamps each composite datum with the version of its descriptor and refuses the output when the world has changed underneath it, producing the error "row type of datum tuple was altered after the datum's creation." The November update also changes how C extensions interact with the server, and extensions built against older headers can still load on a new server without carrying the new checks, so they need to be rebuilt as well.

Ince was not the only researcher in this batch. Seventeen other researchers reported overlapping issues, including the OpenAI and Anthropic security teams, and six of the 52 CVEs came from Ince's own work, out of 21 cases he reported. He said he tested the flaw against major managed PostgreSQL services, including Supabase, Amazon RDS and Aurora, AlloyDB and Databricks, and found that anywhere a tenant can run SQL, the distance between a login and server-side code execution was the same.

The other flaws in the batch reach beyond the server core. Crafted archives can run code through the database restore tool, tracked as CVE-2026-116314, and the database dump tool has an SQL injection flaw in how it handles not-null constraint names, CVE-2026-116318, while the reindex and vacuum utilities carry similar quoting and search-path issues. Some flaws reverse the usual direction of attack: a compromised publisher can run code on a subscriber through logical replication, and a hostile foreign server can attack the database that queries it. One flaw, CVE-2026-116322, is reachable before authentication and can force a server restart on PostgreSQL 18.

The release is also the final one for PostgreSQL 14. The announcement states plainly that this is the last release of the branch, which is now end-of-life and will no longer receive security and bug fixes, and users running it in production are urged to plan an upgrade to a newer supported version. PostgreSQL 19 is due for general availability on November 19, 2026. The previous quarterly update in August fixed 28 security issues, then the most the project had fixed at once; this batch nearly doubles that number, a sign of how much scrutiny the database is now under from both human researchers and AI-assisted review.

Applying the update itself is straightforward, but the project warns that extra steps are needed afterward. Users can simply stop PostgreSQL and update its binaries, with no dump and reload required, but some GIN, trigram GiST and bpchar B-tree indexes need to be reindexed after updating because of index corruption fixes in the release, and anyone using incremental backups should take a new full backup afterward. Teams should also review who holds CREATE privileges, since most code execution paths in this batch start there, and restore database dumps only from trusted sources.

Why it matters: This matters because PostgreSQL is the database underneath a huge share of the world's applications, from startups to the managed services that host them, and the flaw class in this batch is the worst kind for that position: an authenticated user turning a database login into code on the host. The 22-year age of the headline bug is a reminder that old, trusted code can hide critical flaws for decades, and that the same code is now being read closely by both human researchers and AI-assisted reviewers, which is why the batches keep getting bigger. The immediate takeaway is practical: patch, rebuild extensions, reindex, and get off PostgreSQL 14 while it still has a final release to land on.

Reporting: PostgreSQL Global Development Group · SecurityOnline · DEV Community

Primary source: PostgreSQL Global Development Group

Spot an error? Orbit News corrects articles promptly and notes the correction in the article. See our Editorial Policy, or flag an error by messaging us on Facebook, X, or Instagram.

← Back to Orbit News Network