PostgreSQL CVE-2026-6460: ALTER ... SET DATA TYPE type confusion lets object creators run OS code (52-flaw release)
SockAnalyst · Security+ certified analyst.
What happened
On November 12, 2026 the PostgreSQL Global Development Group released 18.7, 17.12, 16.16, 15.20 and 14.25, fixing 52 security vulnerabilities and over 140 bugs. The headline flaw, CVE-2026-6460 (CVSS 3.1 8.8), is a type confusion: PostgreSQL did not track typed values well enough, so stale values could end up in data dictionary entries, PL/pgSQL variables and elsewhere. A user who can create objects can abuse ALTER ... SET DATA TYPE (or routes such as ALTER TABLE ... ADD COLUMN; ROLLBACK; ALTER TABLE ... ADD COLUMN) to run arbitrary code as the operating-system user running the database. The fix changes the server's interface to C extensions, so old extensions still load on a patched server but may not be protected. The same release fixes several other 8.8-rated code-execution bugs in plperl, pltcl, pg_restore, pg_dump and text search functions. No in-the-wild exploitation has been reported and it is not on CISA KEV. PostgreSQL 14 is now end-of-life; 14.25 is its last release.
Who's affected
Every PostgreSQL server before 18.7, 17.12, 16.16, 15.20 or 14.25, especially multi-tenant or shared databases where untrusted users or applications can create tables, types or functions. Managed services (RDS, Cloud SQL, Azure) patch on their own schedule, so check your provider's maintenance status.
✅ Fix / patch
- Upgrade to 18.7, 17.12, 16.16, 15.20 or 14.25 (match your major version) and restart PostgreSQL, including clusters run under Patroni or other managers outside the package service unit.
- Update or rebuild every C-language extension in the same maintenance window. Old extensions on a new server load but may miss the fix; new extensions on an old server fail with undefined symbol errors.
- Update client tools (pg_dump, pg_restore, reindexdb, vacuumdb) on every machine that runs them; several of the 52 fixes are in those tools.
- Until patched, review which roles hold CREATE on schemas and databases and remove it where not needed. Plan a move off PostgreSQL 14, which is now end-of-life.
🔎 Quick hunt check
No IOCs have been published and no exploitation is reported. Hunt two ways: DDL that changes column types or adds-then-rolls-back columns from roles that do not normally run schema changes (needs log_statement = 'ddl' or pgaudit), and the outcome of code execution, meaning the postgres OS user or postgres process spawning shells, downloaders or interpreters.
MITRE ATT&CK: T1068, T1059.004
IOCs
No IOCs (IPs, domains or hashes) published by the sources yet.
Hunt queries
Starting points built only from published indicators. Field names vary; tune before use.
index=* earliest=-30d
( ((sourcetype=*postgres* OR source=*postgresql*) ("ALTER TABLE" OR "ALTER TYPE" OR "ALTER DOMAIN" OR "ADD COLUMN")) OR ((sourcetype=*sysmon* OR sourcetype=*linux* OR sourcetype=*auditd* OR sourcetype=*edr*) (parent_process_name=postgres OR parent_process_name=postgres.exe OR ParentImage=*\\postgres.exe OR user=postgres)) )
| eval signal=case(match(_raw,"(?i)SET\s+DATA\s+TYPE|ALTER\s+COLUMN\s+\S+\s+TYPE"),"ddl_type_change", match(_raw,"(?i)ADD\s+COLUMN"),"ddl_add_column", match(_raw,"(?i)\b(sh|bash|dash|cmd\.exe|powershell\.exe|curl|wget|python3?|perl|nc|ncat)\b"),"postgres_spawned_process", true(),null())
| where isnotnull(signal)
| rex "user=(?<db_user>[^,\s]+)"
| stats count min(_time) as first_seen max(_time) as last_seen values(db_user) as db_users values(signal) as signals by host
| sort - count
// PostgreSQL CVE-2026-6460: unexpected column-type DDL plus shells/downloaders spawned by the postgres process or userunion isfuzzy=true
(Syslog
| where TimeGenerated > ago(30d)
| where ProcessName has "postgres"
| where SyslogMessage matches regex @"(?i)ALTER\s+(TABLE|TYPE|DOMAIN).*(SET\s+DATA\s+TYPE|ALTER\s+COLUMN\s+\S+\s+TYPE|ADD\s+COLUMN)"
| extend Signal = "ddl_type_change_or_add_column", Device = Computer, Evidence = SyslogMessage),
(DeviceProcessEvents
| where TimeGenerated > ago(30d)
| where InitiatingProcessFileName in~ ("postgres", "postgres.exe") or AccountName =~ "postgres"
| where FileName in~ ("sh", "bash", "dash", "cmd.exe", "powershell.exe", "curl", "wget", "python", "python3", "perl", "nc", "ncat")
| extend Signal = "postgres_spawned_process", Device = DeviceName, Evidence = ProcessCommandLine)
| summarize Hits = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated), Signals = make_set(Signal), Evidence = make_set(Evidence, 20) by Device
| order by Hits desc
// PostgreSQL CVE-2026-6460: unexpected column-type DDL plus shells/downloaders spawned by the postgres process or user⏱ CISA deadline
Not in CISA KEV as of Nov 18, 2026.
Sources
- PostgreSQL: CVE-2026-6460 type confusion after ALTER ... SET DATA TYPE executes arbitrary code
- PostgreSQL: PostgreSQL 18.7, 17.12, 16.16, 15.20, 14.25, and 19 RC 2 Released!
- Devrim Gündüz (PGDG RPM maintainer): update the server and extensions together
- The Hacker News: PostgreSQL patches 52 flaws, including 22-year-old bug enabling authenticated RCE
Related playbooks
- Oracle Java / OpenJDK CVE-2026-114938: Java4Shell Base64 decoder heap overflow allows pre-auth RCE on AVX-512 VBMI x86-64 servers · Patch · 2026-11-17
- Linux kernel CVE-2026-98432: no-login remote root via MPTCP listeners · Patch · 2026-10-30
- Linux kernel NoisyTCP CVE-2026-99288: 11-year-old TCP race lets remote attackers crash servers pre-auth · Patch · 2026-11-16
Get the SockAnalyst Weekly Brief free, every Thursday.
One email a week with the KEV deadlines, patches and hunt queries that matter. New playbooks still post here on the site every morning.
Subscribe free
SockAnalyst