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.

Capa com o código CVE-2026-6460, a nota CVSS 8.8 e as versões corrigidas ao lado de uma pilha de discos de banco de dados com uma camada em vermelho
Uma camada corrompida no meio da pilha. A correção chegou em todas as versões suportadas no mesmo dia.

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.

FieldValue
ComponentCore server
CVSS8.8 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H)
PrivilegeLow: whoever can create database objects
InteractionNone
WorkaroundNone given: the way out is to update
Fixed onNov 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:

BranchFixed in
1818.7
1717.12
1616.16
1515.20
1414.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:

The 52 CVEs of the Nov 12, 2026 release, by CVSS scoreCVEs
The 52 CVEs of the Nov 12, 2026 release, by CVSS score
CVEs
CVSS 8.832
Other high (7.0 to 8.1)6
Medium (4.0 to 6.9)12
Low (up to 3.9)2

PostgreSQL announcement, Nov 12, 2026

So even if you conclude CVE-2026-6460 doesn't apply to your environment, there are good reasons to update.

How to fix it

  1. Find the version of every server. Run SELECT version(); on each instance, replicas and test environments included.
  2. 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.
  3. 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.
  4. On a managed service, follow your provider's notice and maintenance window.
  5. 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.

Sources

Written by

Leavory Team Leavory team

Engineering and security at Leavory

The people who build Leavory. We write about what we learn running vulnerability management, pipelines and Kubernetes for our customers and for ourselves.

LinkedIn

See Leavory in action.

Tell us which platform you use, and an engineer, not a sales bot, will reach out to schedule a demo.

Which platform do you use?

A real conversation with an engineer.