CVE-2026-18447: 
PostgreSQL vulnerability analysis and mitigation

Overview

CVE-2026-18447 is a type confusion vulnerability in PostgreSQL SQL-language functions that allows an authenticated database user (object creator) to execute arbitrary code as the operating system user running the database process, via an output parameter of type "any". It affects PostgreSQL versions 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. The vulnerability was published on November 12, 2026, with patches released simultaneously. It carries a CVSS v3.1 base score of 8.8 (High) (GitHub Advisory, PostgreSQL Security).

Technical details

The root cause is classified as CWE-843 (Access of Resource Using Incompatible Type / Type Confusion), where PostgreSQL's handling of SQL-language function output parameters fails to enforce type safety when the declared output type is "any". An attacker who has the ability to create database objects (e.g., functions) can define a SQL-language function with an output parameter typed as "any", causing the database engine to misinterpret memory at runtime and redirect execution to attacker-controlled code. Exploitation requires network access and low-privilege database credentials, but no user interaction or elevated database roles beyond the ability to create functions (GitHub Advisory, Red Hat Bugzilla). A patch commit is available in the PostgreSQL git repository (PostgreSQL Git).

Impact

Successful exploitation grants an attacker arbitrary code execution with the privileges of the OS user running the PostgreSQL database process (typically postgres), resulting in full compromise of confidentiality, integrity, and availability of the database host. An attacker could read or exfiltrate all data stored in the database, modify or destroy data, install backdoors, and potentially pivot to other systems accessible from the database server. The impact is scoped to the affected database host but can enable significant lateral movement in environments where the database server has broad network access (GitHub Advisory, Red Hat Bugzilla).

Exploitability

As of the time of disclosure, there is no public proof-of-concept exploit code and no evidence of in-the-wild exploitation (GitHub Advisory). The EPSS score is approximately 0.59%, placing it in the 49th percentile for exploitation likelihood within 30 days. The NVD SSVC assessment indicates exploitation is currently "none" and the attack is not automatable. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. No threat actor attribution has been reported (GitHub Advisory).

Exploitation steps

  1. Reconnaissance: Identify PostgreSQL instances running vulnerable versions (14.x < 14.25, 15.x < 15.20, 16.x < 16.16, 17.x < 17.12, 18.x < 18.7) using network scanning tools such as Nmap or Shodan, targeting port 5432.
  2. Obtain low-privilege credentials: Acquire any valid database user account with the ability to create functions (e.g., via credential stuffing, phishing, or use of a shared/default account).
  3. Connect to the database: Establish a connection to the target PostgreSQL instance using the obtained credentials via psql or a compatible client.
  4. Create a malicious SQL-language function: Define a SQL-language function with an output parameter of type "any" that embeds a crafted payload exploiting the type confusion flaw, causing the database engine to misinterpret memory and execute attacker-controlled code.
  5. Trigger execution: Invoke the malicious function within the database session, causing arbitrary code to execute as the OS user running the PostgreSQL process (typically postgres).
  6. Achieve OS-level access: Use the code execution to establish a reverse shell, exfiltrate data, or perform further actions on the host system (GitHub Advisory, PostgreSQL Security).

Indicators of compromise

  • Logs: PostgreSQL server logs (postgresql.log) showing creation of SQL-language functions with output parameters of type "any" by non-administrative users; unexpected CREATE FUNCTION statements from low-privilege accounts.
  • Database: Presence of suspicious SQL-language functions in pg_proc with prorettype or argument types referencing "any" (pg_type.typname = 'any'); functions created by unexpected users.
  • Process: Unusual child processes spawned by the postgres OS process (e.g., /bin/sh, bash, curl, wget, python) visible in process trees.
  • Network: Unexpected outbound connections from the PostgreSQL server host to external IP addresses, particularly on non-standard ports, following database function invocations.
  • File System: New or modified files in directories writable by the postgres OS user, including cron jobs, SSH authorized keys, or web shells (Red Hat Bugzilla, PostgreSQL Security).

Mitigation and workarounds

Upgrade PostgreSQL to the patched versions: 14.25, 15.20, 16.16, 17.12, or 18.7 (PostgreSQL News). As a workaround where immediate patching is not possible, restrict the CREATE FUNCTION privilege to trusted users only by revoking it from untrusted roles (REVOKE CREATE ON SCHEMA public FROM PUBLIC). Additionally, audit existing SQL-language functions for suspicious output parameters of type "any" using SELECT proname, proargtypes FROM pg_proc WHERE prolang = (SELECT oid FROM pg_language WHERE lanname = 'sql'). Red Hat has issued errata RHSA-2026:100123 for affected RHEL packages (Red Hat Errata), and Amazon Linux advisories are also available (Amazon Linux).

Community reactions

The PostgreSQL project released a coordinated security update alongside the November 2026 patch release, addressing this and other CVEs simultaneously (PostgreSQL News). Security coverage from outlets such as Security Online and Brandefense highlighted the release as a significant multi-CVE update (Security Online, Brandefense). The pganalyze blog and HeroDevs also published technical summaries of the November 2026 security release for the PostgreSQL community (pganalyze, HeroDevs). Red Hat and Microsoft both acknowledged the vulnerability through their respective advisory channels (Red Hat CVE, Microsoft MSRC).

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