Heads up, database wranglers: PostgreSQL just dropped a minor-release hotfix that squashes 52 security bugs — and yes, one of them is a delightfully ancient, 22-year-old beast that lets an attacker with certain privileges run code on the server.

What happened (in plain English)

The most worrying item is a type confusion issue tracked as CVE-2026-6460. In short: PostgreSQL can get confused about the actual types stored inside composite values, which can let a user who can create or change objects make the server misread memory and eventually execute commands with the OS rights of the database process. The vulnerability carries a CVSS score of 8.8, and affects releases older than 18.7, 17.12, 16.16, 15.20, and 14.25.

A security researcher published a technical write-up showing how to trigger the issue on an unpatched server: prepare a query that holds a composite value, change the type of one of its fields, then run the query to crash the server and leak memory. The public write-up stops short of publishing the final code-execution step, but the path from crash to remote code execution is demonstrated in research. The project says it has no evidence of active exploitation in the wild so far.

Other fixes in this release include several high-scoring flaws (many rated 8.8), a client-tool issue that could let crafted archives or dump output execute code during restore, and one flaw that can let an unauthenticated client cause certain servers to restart.

How to protect your systems

  • Upgrade the server to the patched minor release for your major version: 18.7, 17.12, 16.16, 15.20, or 14.25 (match your major release).
  • Immediately rebuild C-language extensions or update them at the same time as the server. Extensions compiled against older releases may still load but might not be protected; some will need source changes and must be rebuilt against the new minor release.
  • Update client tools (pg_dump, pg_restore, reindexdb, vacuumdb, etc.) on every machine that runs them. Restore/restore-script paths were part of the fixes.
  • If you run PostgreSQL under a custom service manager or orchestration (such as outside the OS package unit), restart the service after updating.
  • Do not disable the new runtime checks. There’s a setting that can turn them off, but the project warns that doing so is risky.
  • Follow recommended post-update steps: reindex where instructed and, if you use incremental backups, take a fresh full backup after updating and base later incrementals on it.
  • Note that PostgreSQL 14 is now end-of-life and 14.25 is the last release for that major version; older unpatched major releases will not receive updates.

In short: patch the server, rebuild any third-party C extensions at the same time, update client tools everywhere, and take a new full backup. Do those things and you’ll be ahead of the chaos.

For teams running managed or cloud PostgreSQL services: the researcher privately shared proof-of-concept details with several providers earlier, and vendors have been notified. If you use a managed offering, check your provider’s security advisory channel for their patch schedule and status.

Final weird-but-important note: this bug has roots in a 2004 feature and later code changes from 2015 — meaning sometimes the nastiest surprises are old bugs that age like fine, slightly hazardous wine. Keep your servers patched and your extensions rebuilt.

And hey — if you’re responsible for a fleet of databases, think of this as an excuse to have a small celebratory backup party after you finish updates.