CVE-2026-6460: a PostgreSQL ALTER that ends in code execution
A type confusion in PostgreSQL's core lets anyone who can create database objects run code on the server. CVSS 8.8, no workaround. What changed and how to fix it.
On November 12, 2026 PostgreSQL released 18.7, 17.12, 16.16, 15.20 and 14.25, fixing 52 vulnerabilities at once. One of them, CVE-2026-6460, stands out for its route: a routine command, ALTER ... SET DATA TYPE, used to run code on the server's operating system.
This article sums up what the official advisory says, who should worry and what to do.
What CVE-2026-6460 is
According to the PostgreSQL advisory, it is a type confusion in the core server that lets an object creator run arbitrary code as the operating system user running PostgreSQL.
The cause, in the project's own words: the system tracked typed values inadequately, and those values were not self-identifying. Stale values could show up in the data dictionary, in PL/pgSQL variables and in other parts of the system.
| Field | Value |
|---|---|
| Component | Core server |
| CVSS | 8.8 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H) |
| Privilege | Low: whoever can create database objects |
| Interaction | None |
| Workaround | None given: the way out is to update |
| Fixed on | Nov 12, 2026 |
The attack routes
The main one is ALTER ... SET DATA TYPE. The advisory notes that other DDL routes exist, such as ALTER TABLE ... ADD COLUMN; ROLLBACK; ALTER TABLE ... ADD COLUMN. The 16.16 release notes describe the underlying problem: operations like ALTER TABLE ... ALTER COLUMN TYPE are hazardous because rows in the older layout may still exist in the system while the type changes.
The flaw isn't in an exotic command. It's in commands data teams run every week.
Who should worry
The vector needs low privilege, not superuser. The advisory speaks of an object creator and gives no more detail. In practice, look more closely when:
- several systems or teams share one cluster and each creates its own tables;
- the application, a BI tool or an analytics user is allowed to create objects;
- the database is offered as a service to customers who get their own user.
In those setups, someone who should only touch their own data can reach the server's operating system, and from there everyone's data.
No public sign of exploitation. None of the official sources we checked says CVE-2026-6460 is being exploited. That doesn't change the priority: the route is known and the fix already exists.
Affected and fixed versions
Every version before these is affected:
| Branch | Fixed in |
|---|---|
| 18 | 18.7 |
| 17 | 17.12 |
| 16 | 16.16 |
| 15 | 15.20 |
| 14 | 14.25 |
The announcement also says PostgreSQL 19 RC 2 already includes the fixes that apply to it.
A release with 52 CVEs
CVE-2026-6460 didn't come alone. The same announcement lists 52 vulnerabilities, and most of them are high:
So even if you conclude CVE-2026-6460 doesn't apply to your environment, there are good reasons to update.
How to fix it
- Find the version of every server. Run
SELECT version();on each instance, replicas and test environments included. - Update to your branch's minor release. Minor releases are cumulative and, per the announcement, need no dump/restore or
pg_upgrade: swap the binaries and restart. - In a container, check that your tag actually got the fix. A tag can stop being updated without notice. Check the version the image really ships, pin it by digest, and only then switch.
- On a managed service, follow your provider's notice and maintenance window.
- Until you update, review who can create objects in the database. The advisory offers no workaround, but fewer people with that privilege means fewer people able to use the route.
Don't turn the new checks off. The 16.16 notes mention the composite_type_mismatch parameter, which disables the new defenses, and warn that doing so carries security risks.
The trap we found at home
When the fix came out, we checked our own Postgres and found 16.15. The image line we used had stopped getting updates months earlier, and 16.16 only existed in a sibling variant. We switched images, tested the update on a copy of the data, scanned the new image (zero vulnerabilities) and rolled it out.
It's the kind of detail a build-time scan misses: the image didn't change, the world around it did. Leavory Image Scan rescans images every day precisely to warn you when a new CVE reaches something already running.