CVE-2026-6460: 
PostgreSQL vulnerability analysis and mitigation

Overview

CVE-2026-6460 is a type confusion vulnerability in PostgreSQL that allows an authenticated database user (object creator) to execute arbitrary code as the operating system user running the database process. The flaw is triggered primarily via ALTER ... SET DATA TYPE DDL statements, with additional attack routes including ALTER TABLE ... ADD COLUMN; ROLLBACK; ALTER TABLE ... ADD COLUMN. The root cause is inadequate tracking of typed values — values were not self-identifying, allowing stale values to appear in data dictionary entries, PL/pgSQL variables, and other system components. Affected versions include PostgreSQL 14.x before 14.25, 15.x before 15.20, 16.x before 16.16, 17.x before 17.12, and 18.x before 18.7. Disclosed on November 12, 2026, it carries a CVSS v3.1 base score of 8.8 (High) (GitHub Advisory, Red Hat Bugzilla).

Technical details

The vulnerability is classified as CWE-843 (Access of Resource Using Incompatible Type / Type Confusion). PostgreSQL's system had inadequate tracking of typed values — typed values were not self-identifying, meaning stale or mismatched type information could persist in data dictionary entries, PL/pgSQL variables, and other internal structures. An attacker with low-privilege database access (object creator role) can issue DDL statements such as ALTER TABLE ... SET DATA TYPE to trigger the type confusion, causing the backend to interpret memory using an incompatible type and ultimately execute attacker-controlled code. The vulnerability is exploitable over the network with low attack complexity and requires no user interaction, making it particularly dangerous in multi-tenant or shared database environments. A public crash PoC (reproducing a SIGSEGV/signal 11) is available on GitHub, and a researcher (mehmetince) published a write-up describing how the 22-year-old primitive was turned into a full RCE chain (GitHub Advisory, Feedly).

Impact

Successful exploitation grants an attacker arbitrary code execution as the OS-level user running the PostgreSQL process (typically postgres), resulting in full confidentiality, integrity, and availability compromise of the database host. An attacker can read or exfiltrate all data stored in the database, modify or destroy data, and potentially pivot to other systems accessible from the database server. Because the code executes at the OS level, the impact extends beyond the database itself — an attacker could install backdoors, access filesystem resources, or use the compromised host as a launchpad for lateral movement within the network (GitHub Advisory, Red Hat Bugzilla).

Exploitability

A public crash proof-of-concept (PoC) is available at https://github.com/slabbdev/postgresql-type-confusion-cve-2026-6460, which reproduces a backend segfault (signal 11) using SQL statements executed as a zero-privilege role; the RCE chain is explicitly not included in this PoC. A second, lower-confidence PoC (https://github.com/chor4o/CVE-2026-6460-POC) written in Python also exists but its contents were not fully verified. A researcher published a detailed write-up describing the full RCE exploitation path. As of the time of reporting, there is no evidence of in-the-wild exploitation, and the CVE is not listed in the CISA KEV catalog. The EPSS score is approximately 0.59%, placing it in the 49th percentile for exploitation probability within 30 days. The vulnerability is detectable by Nessus (plugin 381532) and Qualys (IDs 389450, 6667390) (GitHub Advisory, Feedly).

Exploitation steps

  1. Reconnaissance: Identify PostgreSQL instances running vulnerable versions (before 18.7, 17.12, 16.16, 15.20, or 14.25) using network scanners or service fingerprinting tools such as Nmap or Shodan.
  2. Obtain low-privilege access: Authenticate to the target PostgreSQL instance with any database user that has object creation privileges (e.g., CREATE privilege on a database or schema).
  3. Create a target object: Create a table or type object in the database that will be used as the vehicle for the type confusion: CREATE TABLE target_table (col int);
  4. Trigger type confusion via DDL: Issue an ALTER TABLE ... SET DATA TYPE statement (or the ALTER TABLE ... ADD COLUMN; ROLLBACK; ALTER TABLE ... ADD COLUMN variant) to cause the backend to retain stale type metadata: ALTER TABLE target_table ALTER COLUMN col SET DATA TYPE text;
  5. Exploit stale type state: Craft subsequent SQL operations that interact with the now-confused type state in data dictionary entries or PL/pgSQL variables, causing the backend to access memory using an incompatible type.
  6. Achieve code execution: Leverage the type confusion primitive to redirect execution flow and run arbitrary OS commands as the postgres OS user, enabling reverse shell establishment, data exfiltration, or further post-exploitation activity (GitHub Advisory, Feedly).

Indicators of compromise

  • Logs: PostgreSQL server logs (postgresql.log) showing backend processes terminated by signal 11 (Segmentation fault) — FATAL: terminating connection due to administrator command or server process (PID XXXX) was terminated by signal 11: Segmentation fault; repeated DDL statements (ALTER TABLE, ALTER TYPE) from low-privilege users in short succession.
  • Database Activity: Unusual ALTER TABLE ... SET DATA TYPE or ALTER TABLE ... ADD COLUMN followed immediately by ROLLBACK and another ALTER TABLE ... ADD COLUMN from the same session or user; DDL activity from roles that do not normally perform schema changes.
  • Process: Unexpected child processes spawned by the PostgreSQL backend process (e.g., /bin/bash, curl, wget, python, nc) visible in process trees (ps aux).
  • Network: Outbound connections from the PostgreSQL server process to unexpected external IP addresses or internal hosts not normally contacted by the database server.
  • File System: New or modified files in the PostgreSQL data directory or system directories owned by the postgres OS user; unexpected cron jobs or scheduled tasks added under the postgres account.

Mitigation and workarounds

The PostgreSQL Global Development Group has released patched versions addressing this vulnerability: 18.7, 17.12, 16.16, 15.20, and 14.25. All users should upgrade to the appropriate patched version immediately. As a temporary workaround prior to patching, restrict DDL privileges — specifically CREATE and ALTER permissions — for untrusted or low-privilege database users. Monitor and alert on DDL statements (ALTER TABLE, ALTER TYPE) from non-administrative roles. Note that PostgreSQL 14 has reached end-of-life with the 14.25 release, so users on that branch should plan migration to a supported major version. Downstream distributions including Red Hat, Debian, Amazon Linux, and FreeBSD have also released updated packages (GitHub Advisory, PostgreSQL Release).

Community reactions

The vulnerability received significant media and community attention, described widely as a "22-year-old bug" given that the underlying type tracking deficiency had existed in PostgreSQL for over two decades. The Hacker News community actively discussed the release, and multiple security blogs (The Hacker News, The Register, pganalyze, HeroDevs) covered the story prominently. The November 2026 PostgreSQL security release was noted as the largest in the project's history, patching 52 CVEs simultaneously. Researcher Mehmet İnce published a detailed multi-part blog series explaining how the type confusion primitive was developed into a full RCE chain. Community discussion also highlighted a practical complication: the fix requires recompiling C extensions against the new PostgreSQL build due to an ABI compatibility break in the 18.7 release, complicating deployment for some users (The Hacker News, ardentperf, pganalyze).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

postgresql-15: 15.20-0+deb12u1

Fixed

sid

postgresql-18: 18.7-1

Fixed

trixie

postgresql-17: 17.12-0+deb13u1

Fixed

Ubuntu

Unknown

bionic (esm-infra)

postgresql-10

Unknown

devel

postgresql-18

Unknown

focal (esm-infra)

postgresql-12

Unknown

jammy

postgresql-14

Unknown

noble

postgresql-16

Unknown

resolute

postgresql-18

Unknown

trusty (esm-infra-legacy)

postgresql-9.3

Deferred

xenial (esm-infra-legacy)

postgresql-9.5

Unknown

RHEL / CentOS

Affected

RHEL 8

postgresql:12/postgresql.src

Affected

RHEL 9

postgresql.src

Affected

RHEL 10

postgresql16.src

Affected

Alpine

Fixed

edge

postgresql16: 16.16-r0

Fixed

v3.21

postgresql15: 15.20-r0

Fixed

v3.22

postgresql15: 15.20-r0

Fixed

v3.23

postgresql16: 16.16-r0

Fixed

Source: This report was generated using AI

Related PostgreSQL vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-6460HIGH8.8
  • PostgreSQL logoPostgreSQL
  • postgresql18-pltcl
NoYesNov 12, 2026
CVE-2026-18447HIGH8.8
  • PostgreSQL logoPostgreSQL
  • postgresql15-test
NoYesNov 12, 2026
CVE-2026-6467HIGH7.2
  • PostgreSQL logoPostgreSQL
  • postgresql15-client
NoYesNov 12, 2026
CVE-2026-16237MEDIUM5.4
  • PostgreSQL logoPostgreSQL
  • postgresql16-llvmjit-debuginfo
NoYesNov 12, 2026
CVE-2026-16240LOW3.7
  • PostgreSQL logoPostgreSQL
  • postgresql15-private-libs
NoYesNov 12, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management