CVE-2026-16237: 
PostgreSQL vulnerability analysis and mitigation

Overview

CVE-2026-16237 is an authorization bypass vulnerability in PostgreSQL's handling of INSERT ... ON CONFLICT statements on auto-updatable views. An authenticated attacker with INSERT and UPDATE privileges on a view can read and modify every row in the view's underlying base table by issuing iterated INSERT ... ON CONFLICT DO UPDATE statements, bypassing the view's WHERE condition — even when the view is designated as a security_barrier view. Affected versions include PostgreSQL 14 (before 14.25), 15 (before 15.20), 16 (before 16.16), 17 (before 17.12), and 18 (before 18.7). It was published on November 12, 2026, with a CVSS v3.1 base score of 5.4 (Medium) (GitHub Advisory, Red Hat Bugzilla).

Technical details

The vulnerability is classified under CWE-424 (Improper Protection of Alternate Path) and CWE-639 (Authorization Bypass Through User-Controlled Key). PostgreSQL auto-updatable views are intended to restrict row visibility and modification via their WHERE clause, including when configured as security_barrier views. However, the conflict resolution path in INSERT ... ON CONFLICT DO UPDATE does not properly enforce the view's WHERE condition, allowing an attacker to iteratively probe and update rows in the base table that should be inaccessible through the view. The fix is tracked in the PostgreSQL git repository (PostgreSQL Git). No public proof-of-concept exploit code has been identified (GitHub Advisory).

Impact

A successful exploit allows an authenticated database user with only INSERT and UPDATE privileges on a view to read and modify all rows in the view's base table, including rows that the view's WHERE condition is designed to hide or protect. This undermines row-level security enforced through views, potentially exposing sensitive data and enabling unauthorized data modification. Availability is not impacted, but both confidentiality and integrity of the base table data are compromised (GitHub Advisory, Red Hat Bugzilla).

Exploitability

There is no evidence of active in-the-wild exploitation or publicly available proof-of-concept code as of the time of disclosure. The EPSS score is approximately 0.272%, indicating a low near-term exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires authenticated access with specific INSERT and UPDATE privileges on a vulnerable view, limiting the attack surface (GitHub Advisory).

Exploitation steps

  1. Reconnaissance: Identify a PostgreSQL instance running a vulnerable version (before 14.25, 15.20, 16.16, 17.12, or 18.7) where the attacker has been granted INSERT and UPDATE privileges on an auto-updatable view.
  2. Identify target view: Enumerate views accessible to the attacker's database account, focusing on those with a WHERE condition intended to restrict row access (including security_barrier views).
  3. Craft conflict-triggering INSERT: Construct an INSERT ... ON CONFLICT DO UPDATE statement targeting the view, using a known or guessed unique key value that may conflict with a row in the base table that is outside the view's WHERE filter.
  4. Iterate to bypass WHERE condition: Repeatedly issue INSERT ... ON CONFLICT DO UPDATE statements with varying key values; the conflict resolution path executes the UPDATE against the base table row without enforcing the view's WHERE condition, allowing the attacker to read (via RETURNING clause or side-channel) and modify restricted rows.
  5. Exfiltrate or modify data: Use the RETURNING clause or observe UPDATE effects to read restricted row data, or craft UPDATE SET expressions to alter base table rows that should be inaccessible through the view (GitHub Advisory, PostgreSQL Git).

Indicators of compromise

  • Database Logs: Unusual or repeated INSERT ... ON CONFLICT DO UPDATE statements targeting views, especially from low-privilege accounts; PostgreSQL pg_stat_activity showing iterative conflict-resolution queries against auto-updatable views.
  • Audit Logs: Unexpected UPDATE operations on base table rows by users who only have privileges on a view, not the base table directly; anomalous access patterns in pgaudit logs showing row modifications outside expected view filter scope.
  • Query Patterns: High volume of INSERT ... ON CONFLICT statements with systematically varying key values from a single session or user, potentially indicating enumeration of base table rows.

Mitigation and workarounds

Upgrade PostgreSQL to the patched versions: 18.7, 17.12, 16.16, 15.20, or 14.25, which contain the fix for this vulnerability (GitHub Advisory, PostgreSQL Release). As a workaround prior to patching, review and restrict INSERT and UPDATE privileges on auto-updatable views to only fully trusted users, and consider replacing auto-updatable views with views backed by explicit INSTEAD OF triggers, which are not affected by this issue. Additionally, audit existing view definitions and privilege grants to enforce least-privilege access on sensitive base tables.

Community reactions

The vulnerability was disclosed as part of PostgreSQL's November 2026 security release, which also addressed other CVEs. Red Hat tracked the issue via Bugzilla and issued a corresponding errata (Red Hat Bugzilla). Security coverage noted the release addressed multiple issues simultaneously, with community discussion on the PostgreSQL mailing lists and security-focused blogs such as pganalyze covering the release (pganalyze Blog). The vulnerability was also noted in the context of a broader PostgreSQL security release fixing a 22-year-old flaw, drawing additional community attention.

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